Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -550,12 +550,11 @@ with gr.Blocks(css=css) as demo:
|
|
550 |
temp_dir_state = gr.State(None)
|
551 |
|
552 |
gr.HTML(lamp_html)
|
553 |
-
gr.Markdown("<h1>πΌοΈ Image Processor</h1>")
|
554 |
-
|
555 |
-
# βββββββ DEFINE STATUS FIRST βββββββ
|
556 |
-
|
557 |
with gr.Row():
|
|
|
|
|
558 |
# βββββββ LEFT PANEL βββββββ
|
|
|
559 |
with gr.Column(scale=3, min_width=500):
|
560 |
with gr.Group(elem_classes="panel"):
|
561 |
mode_toggle = gr.Radio(
|
@@ -607,31 +606,24 @@ with gr.Blocks(css=css) as demo:
|
|
607 |
process_btn = gr.Button("βοΈ Process", elem_id="process-btn-url")
|
608 |
|
609 |
with gr.Group(elem_classes="panel"):
|
610 |
-
|
611 |
-
["JPEG","PNG","WEBP","TIFF","GIF","JFIF","AVIF"],
|
612 |
-
label="
|
613 |
-
|
614 |
-
)
|
615 |
-
width = gr.Number(label="Width (px)", value=1000, precision=0)
|
616 |
-
height = gr.Number(label="Height (px)", value=1000, precision=0)
|
617 |
-
|
618 |
-
with gr.Row(elem_classes="btn-row"):
|
619 |
-
stop_btn = gr.Button("Stop", elem_id="stop-btn")
|
620 |
-
clear_btn = gr.Button("Clear", elem_id="clear-btn")
|
621 |
|
622 |
-
|
623 |
-
with gr.Column(scale=2, min_width=400):
|
624 |
with gr.Group(elem_classes="panel"):
|
625 |
-
status = gr.Textbox(
|
626 |
-
label="π£ Status",
|
627 |
-
lines=18,
|
628 |
-
interactive=False,
|
629 |
-
elem_id="status-box"
|
630 |
-
)
|
631 |
zip_download_btn = gr.Button("π¦ Download ZIP")
|
632 |
-
zip_file_hidden
|
633 |
with gr.Accordion("π§· Individual Files", open=False):
|
634 |
-
single_downloads = gr.File(file_count="multiple")
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
|
636 |
# βββββββ HOOK UP EVENTS βββββββ
|
637 |
process_btn.click(
|
|
|
550 |
temp_dir_state = gr.State(None)
|
551 |
|
552 |
gr.HTML(lamp_html)
|
|
|
|
|
|
|
|
|
553 |
with gr.Row():
|
554 |
+
gr.Markdown("<h1>πΌοΈ Image Processor</h1>")
|
555 |
+
|
556 |
# βββββββ LEFT PANEL βββββββ
|
557 |
+
with gr.Row():
|
558 |
with gr.Column(scale=3, min_width=500):
|
559 |
with gr.Group(elem_classes="panel"):
|
560 |
mode_toggle = gr.Radio(
|
|
|
606 |
process_btn = gr.Button("βοΈ Process", elem_id="process-btn-url")
|
607 |
|
608 |
with gr.Group(elem_classes="panel"):
|
609 |
+
with gr.Row():
|
610 |
+
format_choice = gr.Dropdown(["JPEG","PNG","WEBP","TIFF","GIF","JFIF","AVIF"],label="πΌοΈ Format", value="JPEG")
|
611 |
+
width = gr.Number(label="Width (px)", value=1000, precision=0)
|
612 |
+
height = gr.Number(label="Height (px)", value=1000, precision=0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
|
614 |
+
with gr.Column(scale=2):
|
|
|
615 |
with gr.Group(elem_classes="panel"):
|
616 |
+
status = gr.Textbox(label="π£ Status", lines=6, interactive=False, elem_id="status-box")
|
|
|
|
|
|
|
|
|
|
|
617 |
zip_download_btn = gr.Button("π¦ Download ZIP")
|
618 |
+
zip_file_hidden = gr.File(visible=False)
|
619 |
with gr.Accordion("π§· Individual Files", open=False):
|
620 |
+
single_downloads = gr.File(label="Files", file_count="multiple")
|
621 |
+
|
622 |
+
with gr.Row(elem_classes="btn-row"):
|
623 |
+
stop_btn = gr.Button("Stop", elem_id="stop-btn")
|
624 |
+
clear_btn = gr.Button("Clear", elem_id="clear-btn")
|
625 |
+
|
626 |
+
gr.Markdown("<center style='margin-top:1rem;color:white'>Created with π by Vishakha</center>")
|
627 |
|
628 |
# βββββββ HOOK UP EVENTS βββββββ
|
629 |
process_btn.click(
|