Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ def process_image_and_text(image, text):
|
|
| 45 |
|
| 46 |
return generated_text
|
| 47 |
|
| 48 |
-
def chatbot(image, text, history
|
| 49 |
if image is None:
|
| 50 |
return history + [("Please upload an image first.", None)]
|
| 51 |
|
|
@@ -72,13 +72,13 @@ with gr.Blocks() as demo:
|
|
| 72 |
submit_button.click(
|
| 73 |
chatbot,
|
| 74 |
inputs=[image_input, text_input, state],
|
| 75 |
-
outputs=[chatbot_output]
|
| 76 |
)
|
| 77 |
|
| 78 |
text_input.submit(
|
| 79 |
chatbot,
|
| 80 |
inputs=[image_input, text_input, state],
|
| 81 |
-
outputs=[chatbot_output]
|
| 82 |
)
|
| 83 |
|
| 84 |
demo.launch()
|
|
|
|
| 45 |
|
| 46 |
return generated_text
|
| 47 |
|
| 48 |
+
def chatbot(image, text, history):
|
| 49 |
if image is None:
|
| 50 |
return history + [("Please upload an image first.", None)]
|
| 51 |
|
|
|
|
| 72 |
submit_button.click(
|
| 73 |
chatbot,
|
| 74 |
inputs=[image_input, text_input, state],
|
| 75 |
+
outputs=[chatbot_output, "messages"]
|
| 76 |
)
|
| 77 |
|
| 78 |
text_input.submit(
|
| 79 |
chatbot,
|
| 80 |
inputs=[image_input, text_input, state],
|
| 81 |
+
outputs=[chatbot_output, "messages"]
|
| 82 |
)
|
| 83 |
|
| 84 |
demo.launch()
|