Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def generate_input(model, image=None, text=None):
|
|
28 |
text_input = "No text provided."
|
29 |
|
30 |
# Combine image caption and text output
|
31 |
-
if image_caption and
|
32 |
# input = f"Image Caption: {image_caption}\nText Query: {text_output}"
|
33 |
input = image_caption+" "+text_input
|
34 |
elif image_caption:
|
@@ -65,7 +65,7 @@ with gr.Blocks() as demo:
|
|
65 |
submit_button = gr.Button("Submit")
|
66 |
output = gr.Textbox(label="Recommendations")
|
67 |
|
68 |
-
submit_button.click(fn=
|
69 |
|
70 |
demo.launch()
|
71 |
|
|
|
28 |
text_input = "No text provided."
|
29 |
|
30 |
# Combine image caption and text output
|
31 |
+
if image_caption and text:
|
32 |
# input = f"Image Caption: {image_caption}\nText Query: {text_output}"
|
33 |
input = image_caption+" "+text_input
|
34 |
elif image_caption:
|
|
|
65 |
submit_button = gr.Button("Submit")
|
66 |
output = gr.Textbox(label="Recommendations")
|
67 |
|
68 |
+
submit_button.click(fn=generate_input, inputs=[image_input, text_input, sentence_model], outputs=output)
|
69 |
|
70 |
demo.launch()
|
71 |
|