Workpam commited on
Commit
fb5179a
Β·
verified Β·
1 Parent(s): d4e6f8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -550,11 +550,10 @@ with gr.Blocks(css=css) as demo:
550
  temp_dir_state = gr.State(None)
551
 
552
  gr.HTML(lamp_html)
553
-
554
  gr.Markdown("<h1>πŸ–ΌοΈ Image Processor</h1>")
555
 
556
  with gr.Row():
557
- with gr.Column(scale=1, min_width=450): # Input/controls
558
  with gr.Group(elem_classes="panel"):
559
  mode_toggle = gr.Radio(
560
  ["πŸ“„ Upload Workbook", "πŸ“€ Upload Images"],
@@ -567,13 +566,11 @@ with gr.Blocks(css=css) as demo:
567
  file_types=['.xlsx', '.xlsm'],
568
  visible=True
569
  )
570
- status = gr.Textbox(
571
- label="πŸ“£ Status", lines=6, interactive=False, elem_id="status-box"
572
- )
573
 
574
  upload_box = gr.File(
575
  label="πŸ“ Upload Images", file_count="multiple", visible=False
576
  )
 
577
  image_url_input = gr.Textbox(
578
  label="🌐 Paste Image URL", visible=False
579
  )
@@ -604,6 +601,8 @@ with gr.Blocks(css=css) as demo:
604
  [status]
605
  )
606
 
 
 
607
  with gr.Group(elem_classes="panel"):
608
  format_choice = gr.Dropdown(
609
  ["JPEG", "PNG", "WEBP", "TIFF", "GIF", "JFIF", "AVIF"],
@@ -612,7 +611,15 @@ with gr.Blocks(css=css) as demo:
612
  width = gr.Number(label=" Width (px)", value=1000, precision=0, scale=1)
613
  height = gr.Number(label=" Height (px)", value=1000, precision=0, scale=1)
614
 
615
- with gr.Column(scale=1, min_width=450): # Output/results
 
 
 
 
 
 
 
 
616
  with gr.Group(elem_classes="panel"):
617
  zip_download_btn = gr.Button("πŸ“¦ Download ZIP")
618
  zip_file_hidden = gr.File(visible=False)
 
550
  temp_dir_state = gr.State(None)
551
 
552
  gr.HTML(lamp_html)
 
553
  gr.Markdown("<h1>πŸ–ΌοΈ Image Processor</h1>")
554
 
555
  with gr.Row():
556
+ with gr.Column(scale=2, min_width=500):
557
  with gr.Group(elem_classes="panel"):
558
  mode_toggle = gr.Radio(
559
  ["πŸ“„ Upload Workbook", "πŸ“€ Upload Images"],
 
566
  file_types=['.xlsx', '.xlsm'],
567
  visible=True
568
  )
 
 
 
569
 
570
  upload_box = gr.File(
571
  label="πŸ“ Upload Images", file_count="multiple", visible=False
572
  )
573
+
574
  image_url_input = gr.Textbox(
575
  label="🌐 Paste Image URL", visible=False
576
  )
 
601
  [status]
602
  )
603
 
604
+ process_btn = gr.Button("βš™οΈ Process", elem_id="process-btn-url")
605
+
606
  with gr.Group(elem_classes="panel"):
607
  format_choice = gr.Dropdown(
608
  ["JPEG", "PNG", "WEBP", "TIFF", "GIF", "JFIF", "AVIF"],
 
611
  width = gr.Number(label=" Width (px)", value=1000, precision=0, scale=1)
612
  height = gr.Number(label=" Height (px)", value=1000, precision=0, scale=1)
613
 
614
+ with gr.Row(elem_classes="btn-row"):
615
+ stop_btn = gr.Button("Stop", elem_id="stop-btn")
616
+ clear_btn = gr.Button("Clear", elem_id="clear-btn")
617
+
618
+ with gr.Column(scale=1, min_width=300):
619
+ status = gr.Textbox(
620
+ label="πŸ“£ Status", lines=16, interactive=False, elem_id="status-box"
621
+ )
622
+
623
  with gr.Group(elem_classes="panel"):
624
  zip_download_btn = gr.Button("πŸ“¦ Download ZIP")
625
  zip_file_hidden = gr.File(visible=False)