Jimmyzheng-10 commited on
Commit
7aaa630
Β·
1 Parent(s): 13bb6b5
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -355,7 +355,7 @@ with gr.Blocks(css="""
355
  with gr.Column(scale=1):
356
  gr.Markdown("## Step 1: Provide an Image")
357
  active_image = gr.Image(type="filepath", height=400)
358
- upload_button = gr.UploadButton("πŸ“ Click to Upload", file_types=["image"], variant="primary")
359
 
360
  gr.Markdown("## Step 2: Write Prompts (Optional)")
361
  with gr.Accordion("Component-specific Prompts", open=False):
@@ -370,14 +370,14 @@ with gr.Blocks(css="""
370
  gr.Markdown("## Preview Area")
371
  gr.Markdown("**Tips**: \n- Use the sliders below to adjust the preview size and zoom level for better viewing experience. \n- Adjust the page's viewing angle by swiping up, down, left, or right.")
372
  with gr.Tabs():
373
- with gr.TabItem("Preview"):
374
  with gr.Row():
375
- scale_slider = gr.Slider(0.2, 1.5, value=0.55, step=0.05, label="πŸ” Zoom")
376
- width_slider = gr.Slider(400, 2000, value=1920, step=50, label="πŸ“ Canvas Width (px)")
377
- height_slider = gr.Slider(300, 1200, value=1080, step=50, label="πŸ“ Canvas Height (px)")
378
 
379
  html_preview = gr.HTML(label="Rendered HTML", show_label=False)
380
- with gr.TabItem("Preview With Placeholder"):
381
  with gr.Row():
382
  scale_slider_with_placeholder = gr.Slider(0.2, 1.5, value=0.55, step=0.05, label="πŸ” Zoom")
383
  width_slider_with_placeholder = gr.Slider(400, 2000, value=1920, step=100, label="πŸ“ Canvas Width (px)")
 
355
  with gr.Column(scale=1):
356
  gr.Markdown("## Step 1: Provide an Image")
357
  active_image = gr.Image(type="filepath", height=400)
358
+ upload_button = gr.UploadButton("Click to Upload", file_types=["image"], variant="primary")
359
 
360
  gr.Markdown("## Step 2: Write Prompts (Optional)")
361
  with gr.Accordion("Component-specific Prompts", open=False):
 
370
  gr.Markdown("## Preview Area")
371
  gr.Markdown("**Tips**: \n- Use the sliders below to adjust the preview size and zoom level for better viewing experience. \n- Adjust the page's viewing angle by swiping up, down, left, or right.")
372
  with gr.Tabs():
373
+ with gr.TabItem("Preview With Placeholder"):
374
  with gr.Row():
375
+ scale_slider = gr.Slider(0.2, 1.5, value=0.55, step=0.05, label="Zoom")
376
+ width_slider = gr.Slider(400, 2000, value=1920, step=50, label="Canvas Width (px)")
377
+ height_slider = gr.Slider(300, 1200, value=1080, step=50, label="Canvas Height (px)")
378
 
379
  html_preview = gr.HTML(label="Rendered HTML", show_label=False)
380
+ with gr.TabItem("Preview"):
381
  with gr.Row():
382
  scale_slider_with_placeholder = gr.Slider(0.2, 1.5, value=0.55, step=0.05, label="πŸ” Zoom")
383
  width_slider_with_placeholder = gr.Slider(400, 2000, value=1920, step=100, label="πŸ“ Canvas Width (px)")