akhaliq HF Staff commited on
Commit
5e704cb
·
verified ·
1 Parent(s): d00b94a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -193,7 +193,6 @@ t2i_example_prompts = [
193
  ]
194
 
195
  # Build Gradio interface
196
- # Pass theme=apple_theme here. fill_width=True ensures it expands horizontally.
197
  with gr.Blocks(fill_width=True) as demo:
198
  gr.HTML("""
199
  <div style="text-align: center; padding: 40px 20px 30px 20px;">
@@ -209,9 +208,8 @@ with gr.Blocks(fill_width=True) as demo:
209
  with gr.Tabs(selected=0):
210
  # Image Edit Tab
211
  with gr.TabItem("Edit Image", id=0):
212
- # gr.Row with NO variant or scale arguments on the row itself
213
  with gr.Row():
214
- # Left Column: Inputs - REMOVED min_width=0
215
  with gr.Column(scale=1, variant="panel"):
216
  gr.Markdown("### 🖼️ Input Image & Controls")
217
  input_image = gr.Image(
@@ -239,7 +237,7 @@ with gr.Blocks(fill_width=True) as demo:
239
 
240
  edit_btn = gr.Button("Edit Image", variant="primary", size="lg")
241
 
242
- # Right Column: Output - REMOVED min_width=0
243
  with gr.Column(scale=1, variant="panel"):
244
  gr.Markdown("### ✨ Result")
245
  output_image = gr.Image(
@@ -263,7 +261,7 @@ with gr.Blocks(fill_width=True) as demo:
263
  # Text-to-Image Tab
264
  with gr.TabItem("Generate Image", id=1):
265
  with gr.Row():
266
- # Left Column: Inputs - REMOVED min_width=0
267
  with gr.Column(scale=1, variant="panel"):
268
  gr.Markdown("### 🎨 Generation Controls")
269
  t2i_prompt = gr.Textbox(
@@ -279,6 +277,7 @@ with gr.Blocks(fill_width=True) as demo:
279
  value=1344,
280
  step=64,
281
  label="Width",
 
282
  )
283
 
284
  t2i_height = gr.Slider(
@@ -287,6 +286,7 @@ with gr.Blocks(fill_width=True) as demo:
287
  value=768,
288
  step=64,
289
  label="Height",
 
290
  )
291
 
292
  t2i_seed = gr.Slider(
@@ -300,7 +300,7 @@ with gr.Blocks(fill_width=True) as demo:
300
 
301
  generate_btn = gr.Button("Generate Image", variant="primary", size="lg")
302
 
303
- # Right Column: Output - REMOVED min_width=0
304
  with gr.Column(scale=1, variant="panel"):
305
  gr.Markdown("### ✨ Result")
306
  t2i_output = gr.Image(
 
193
  ]
194
 
195
  # Build Gradio interface
 
196
  with gr.Blocks(fill_width=True) as demo:
197
  gr.HTML("""
198
  <div style="text-align: center; padding: 40px 20px 30px 20px;">
 
208
  with gr.Tabs(selected=0):
209
  # Image Edit Tab
210
  with gr.TabItem("Edit Image", id=0):
 
211
  with gr.Row():
212
+ # Left Column: Inputs
213
  with gr.Column(scale=1, variant="panel"):
214
  gr.Markdown("### 🖼️ Input Image & Controls")
215
  input_image = gr.Image(
 
237
 
238
  edit_btn = gr.Button("Edit Image", variant="primary", size="lg")
239
 
240
+ # Right Column: Output
241
  with gr.Column(scale=1, variant="panel"):
242
  gr.Markdown("### ✨ Result")
243
  output_image = gr.Image(
 
261
  # Text-to-Image Tab
262
  with gr.TabItem("Generate Image", id=1):
263
  with gr.Row():
264
+ # Left Column: Inputs
265
  with gr.Column(scale=1, variant="panel"):
266
  gr.Markdown("### 🎨 Generation Controls")
267
  t2i_prompt = gr.Textbox(
 
277
  value=1344,
278
  step=64,
279
  label="Width",
280
+ visible=False, # <--- Hiding Width Slider
281
  )
282
 
283
  t2i_height = gr.Slider(
 
286
  value=768,
287
  step=64,
288
  label="Height",
289
+ visible=False, # <--- Hiding Height Slider
290
  )
291
 
292
  t2i_seed = gr.Slider(
 
300
 
301
  generate_btn = gr.Button("Generate Image", variant="primary", size="lg")
302
 
303
+ # Right Column: Output
304
  with gr.Column(scale=1, variant="panel"):
305
  gr.Markdown("### ✨ Result")
306
  t2i_output = gr.Image(