Spaces:
Running
Running
Update app.py
Browse files
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=
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|