Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -113,19 +113,17 @@ with demo:
|
|
113 |
with gr.Row():
|
114 |
with gr.Column(scale=1):
|
115 |
new_zip_files = gr.File(label="Upload Zip Files", type="filepath", file_count="multiple")
|
|
|
|
|
|
|
116 |
new_image_files = gr.File(label="Upload Images", type="filepath", file_count="multiple")
|
117 |
-
|
118 |
-
|
119 |
|
120 |
-
|
121 |
-
generate_captions_btn = gr.Button("Generate Captions")
|
122 |
-
|
123 |
-
def add_files(zip_files, image_files, new_zip_files, new_image_files):
|
124 |
-
zip_files.extend(new_zip_files)
|
125 |
-
image_files.extend(new_image_files)
|
126 |
-
return zip_files, image_files
|
127 |
|
128 |
-
|
129 |
-
|
|
|
130 |
|
131 |
demo.launch(share=True)
|
|
|
113 |
with gr.Row():
|
114 |
with gr.Column(scale=1):
|
115 |
new_zip_files = gr.File(label="Upload Zip Files", type="filepath", file_count="multiple")
|
116 |
+
zip_captions_btn = gr.Button("Generate Zip Captions")
|
117 |
+
output_zip_file = gr.File(label="Download Caption File")
|
118 |
+
with gr.Column(scale=1):
|
119 |
new_image_files = gr.File(label="Upload Images", type="filepath", file_count="multiple")
|
120 |
+
image_captions_btn = gr.Button("Generate Image Captions")
|
121 |
+
output_image_file = gr.File(label="Download Caption File")
|
122 |
|
123 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
+
|
126 |
+
zip_captions_btn.click(fn=gr_process, inputs=zip_files, outputs=output_zip_file)
|
127 |
+
image_captions_btn.click(fn=gr_process, inputs=image_files, outputs=output_image_file)
|
128 |
|
129 |
demo.launch(share=True)
|