Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,12 +79,12 @@ with gr.Blocks() as demo:
|
|
79 |
|
80 |
file_output = gr.Textbox(label="Generated Caption/Post Content")
|
81 |
|
82 |
-
def process_generate(files
|
83 |
if not files:
|
84 |
return None, "Image not uploaded"
|
85 |
return upload_file(files, text_input, social_media_input, num_captions_input)
|
86 |
|
87 |
upload_button.upload(fn=lambda files: files[0].name if files else None, inputs=[upload_button], outputs=image_output)
|
88 |
-
generate_button.click(fn=process_generate, inputs=[upload_button
|
89 |
|
90 |
demo.launch(debug=True)
|
|
|
79 |
|
80 |
file_output = gr.Textbox(label="Generated Caption/Post Content")
|
81 |
|
82 |
+
def process_generate(files):
|
83 |
if not files:
|
84 |
return None, "Image not uploaded"
|
85 |
return upload_file(files, text_input, social_media_input, num_captions_input)
|
86 |
|
87 |
upload_button.upload(fn=lambda files: files[0].name if files else None, inputs=[upload_button], outputs=image_output)
|
88 |
+
generate_button.click(fn=process_generate, inputs=[upload_button], outputs=[image_output, file_output])
|
89 |
|
90 |
demo.launch(debug=True)
|