akhaliq HF Staff commited on
Commit
4039a38
·
verified ·
1 Parent(s): 32fd425

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -40
app.py CHANGED
@@ -120,43 +120,10 @@ custom_theme = gr.themes.Soft(
120
  text_size=gr.themes.sizes.text_lg,
121
  font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
122
  font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "ui-monospace", "Consolas", "monospace"],
123
- ).set(
124
- # Button styling
125
- button_primary_background_fill="#0071e3",
126
- button_primary_background_fill_hover="#0077ed",
127
- button_primary_text_color="white",
128
- button_large_padding="16px 40px",
129
- button_large_radius="12px",
130
- button_shadow="0 2px 8px rgba(0, 113, 227, 0.2)",
131
- button_shadow_hover="0 4px 12px rgba(0, 113, 227, 0.3)",
132
-
133
- # Input styling
134
- input_background_fill="#fbfbfd",
135
- input_background_fill_focus="white",
136
- input_border_color="#d2d2d7",
137
- input_border_color_focus="#0071e3",
138
- input_radius="12px",
139
- input_padding="16px",
140
- input_shadow_focus="0 0 0 4px rgba(0, 113, 227, 0.1)",
141
-
142
- # Container styling
143
- block_background_fill="white",
144
- block_border_width="1px",
145
- block_border_color="#e5e5e7",
146
- block_radius="12px",
147
- block_padding="24px",
148
-
149
- # Body styling
150
- body_background_fill="#f5f5f7",
151
- body_text_color="#1d1d1f",
152
-
153
- # Link styling
154
- link_text_color="#0071e3",
155
- link_text_color_hover="#0077ed",
156
  )
157
 
158
- # Minimal additional CSS for layout refinements
159
- minimal_css = """
160
  .gradio-container {
161
  max-width: 900px !important;
162
  margin: 0 auto !important;
@@ -208,6 +175,16 @@ minimal_css = """
208
  margin: 0.25rem 0;
209
  }
210
 
 
 
 
 
 
 
 
 
 
 
211
  @media (max-width: 768px) {
212
  .main-header h1 {
213
  font-size: 2rem !important;
@@ -222,8 +199,6 @@ minimal_css = """
222
  # Create the Gradio interface
223
  with gr.Blocks(
224
  title="Z-Image Turbo",
225
- theme=custom_theme,
226
- css=minimal_css,
227
  fill_height=False
228
  ) as demo:
229
 
@@ -265,8 +240,7 @@ with gr.Blocks(
265
  type="pil",
266
  label="Generated Image",
267
  show_label=False,
268
- show_download_button=True,
269
- show_share_button=False,
270
  container=True
271
  )
272
 
@@ -297,5 +271,7 @@ with gr.Blocks(
297
  if __name__ == "__main__":
298
  demo.launch(
299
  share=False,
300
- show_error=True
 
 
301
  )
 
120
  text_size=gr.themes.sizes.text_lg,
121
  font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
122
  font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "ui-monospace", "Consolas", "monospace"],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  )
124
 
125
+ # Custom CSS for additional styling
126
+ custom_css = """
127
  .gradio-container {
128
  max-width: 900px !important;
129
  margin: 0 auto !important;
 
175
  margin: 0.25rem 0;
176
  }
177
 
178
+ button.primary {
179
+ background-color: #0071e3 !important;
180
+ transition: all 0.2s ease !important;
181
+ }
182
+
183
+ button.primary:hover {
184
+ background-color: #0077ed !important;
185
+ box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important;
186
+ }
187
+
188
  @media (max-width: 768px) {
189
  .main-header h1 {
190
  font-size: 2rem !important;
 
199
  # Create the Gradio interface
200
  with gr.Blocks(
201
  title="Z-Image Turbo",
 
 
202
  fill_height=False
203
  ) as demo:
204
 
 
240
  type="pil",
241
  label="Generated Image",
242
  show_label=False,
243
+ buttons=["download"],
 
244
  container=True
245
  )
246
 
 
271
  if __name__ == "__main__":
272
  demo.launch(
273
  share=False,
274
+ show_error=True,
275
+ theme=custom_theme,
276
+ css=custom_css
277
  )