suayptalha
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def describe_image(image, user_message):
|
|
17 |
api_name="/answer_question"
|
18 |
)
|
19 |
|
20 |
-
description = result
|
21 |
|
22 |
history.append(f"User: {user_message}")
|
23 |
history.append(f"Assistant: {description}")
|
@@ -51,8 +51,8 @@ def chat_or_image(image, user_message):
|
|
51 |
demo = gr.Interface(
|
52 |
fn=chat_or_image,
|
53 |
inputs=[
|
54 |
-
gr.Image(type="filepath", label="
|
55 |
-
gr.Textbox(label="
|
56 |
],
|
57 |
outputs="text",
|
58 |
)
|
|
|
17 |
api_name="/answer_question"
|
18 |
)
|
19 |
|
20 |
+
description = result
|
21 |
|
22 |
history.append(f"User: {user_message}")
|
23 |
history.append(f"Assistant: {description}")
|
|
|
51 |
demo = gr.Interface(
|
52 |
fn=chat_or_image,
|
53 |
inputs=[
|
54 |
+
gr.Image(type="filepath", label="Upload image (Optional)"),
|
55 |
+
gr.Textbox(label="Ask anything", placeholder="Ask...", lines=2)
|
56 |
],
|
57 |
outputs="text",
|
58 |
)
|