Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -125,25 +125,19 @@ with demo:
|
|
125 |
with gr.Row():
|
126 |
with gr.Column(scale=1):
|
127 |
new_zip_files = gr.File(label="Upload Zip Files", type="filepath", file_count="multiple")
|
|
|
128 |
new_image_files = gr.File(label="Upload Images", type="filepath", file_count="multiple")
|
|
|
129 |
with gr.Column(scale=3):
|
130 |
output_zip_file = gr.File(label="Download Zip Captions")
|
131 |
output_image_file = gr.File(label="Download Image Captions")
|
132 |
combined_file = gr.File(label="Download Combined Captions")
|
133 |
-
|
134 |
-
# add_files_btn = gr.Button("Add More Files")
|
135 |
-
generate_zip_captions_btn = gr.Button("Generate Zip Captions")
|
136 |
-
generate_image_captions_btn = gr.Button("Generate Image Captions")
|
137 |
combine_files_btn = gr.Button("Combine CSV Files")
|
138 |
|
139 |
-
|
140 |
-
# zip_files.extend(new_zip_files)
|
141 |
-
# image_files.extend(new_image_files)
|
142 |
-
# return zip_files, image_files
|
143 |
-
|
144 |
-
# add_files_btn.click(add_files, inputs=[zip_files, image_files, new_zip_files, new_image_files], outputs=[zip_files, image_files])
|
145 |
generate_zip_captions_btn.click(fn=gr_process_zip, inputs=zip_files, outputs=output_zip_file)
|
146 |
generate_image_captions_btn.click(fn=gr_process_images, inputs=image_files, outputs=output_image_file)
|
147 |
combine_files_btn.click(fn=combine_csv_files, inputs=[output_zip_file, output_image_file], outputs=combined_file)
|
148 |
|
149 |
demo.launch()
|
|
|
|
125 |
with gr.Row():
|
126 |
with gr.Column(scale=1):
|
127 |
new_zip_files = gr.File(label="Upload Zip Files", type="filepath", file_count="multiple")
|
128 |
+
generate_zip_captions_btn = gr.Button("Generate Zip Captions")
|
129 |
new_image_files = gr.File(label="Upload Images", type="filepath", file_count="multiple")
|
130 |
+
generate_image_captions_btn = gr.Button("Generate Image Captions")
|
131 |
with gr.Column(scale=3):
|
132 |
output_zip_file = gr.File(label="Download Zip Captions")
|
133 |
output_image_file = gr.File(label="Download Image Captions")
|
134 |
combined_file = gr.File(label="Download Combined Captions")
|
|
|
|
|
|
|
|
|
135 |
combine_files_btn = gr.Button("Combine CSV Files")
|
136 |
|
137 |
+
|
|
|
|
|
|
|
|
|
|
|
138 |
generate_zip_captions_btn.click(fn=gr_process_zip, inputs=zip_files, outputs=output_zip_file)
|
139 |
generate_image_captions_btn.click(fn=gr_process_images, inputs=image_files, outputs=output_image_file)
|
140 |
combine_files_btn.click(fn=combine_csv_files, inputs=[output_zip_file, output_image_file], outputs=combined_file)
|
141 |
|
142 |
demo.launch()
|
143 |
+
|