Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1011,15 +1011,14 @@ with gr.Blocks(css=BASE_CSS, title="ForgeCaptions") as demo:
|
|
| 1011 |
with gr.Tab("Batch"):
|
| 1012 |
with gr.Accordion("Uploaded images", open=True):
|
| 1013 |
input_files = gr.File(label="Drop images (or click to select)", file_types=["image"], file_count="multiple",)
|
| 1014 |
-
|
| 1015 |
-
run_button = gr.Button("Caption batch", variant="primary")
|
| 1016 |
preview_gallery = gr.Gallery(
|
| 1017 |
label="Preview (un-captioned)",
|
| 1018 |
show_label=True,
|
| 1019 |
columns=5,
|
| 1020 |
height=220,
|
| 1021 |
)
|
| 1022 |
-
|
|
|
|
| 1023 |
|
| 1024 |
|
| 1025 |
# ---- Results area (gallery left / table right)
|
|
|
|
| 1011 |
with gr.Tab("Batch"):
|
| 1012 |
with gr.Accordion("Uploaded images", open=True):
|
| 1013 |
input_files = gr.File(label="Drop images (or click to select)", file_types=["image"], file_count="multiple",)
|
|
|
|
|
|
|
| 1014 |
preview_gallery = gr.Gallery(
|
| 1015 |
label="Preview (un-captioned)",
|
| 1016 |
show_label=True,
|
| 1017 |
columns=5,
|
| 1018 |
height=220,
|
| 1019 |
)
|
| 1020 |
+
input_files.change(on_files_changed, inputs=[input_files], outputs=[preview_gallery])
|
| 1021 |
+
run_button = gr.Button("Caption batch", variant="primary")
|
| 1022 |
|
| 1023 |
|
| 1024 |
# ---- Results area (gallery left / table right)
|