Update Home.py
Browse files
Home.py
CHANGED
|
@@ -79,11 +79,14 @@ def load_image():
|
|
| 79 |
def visual_qna():
|
| 80 |
st.title("Visual Q&A")
|
| 81 |
img = load_image()
|
| 82 |
-
if
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
|
| 89 |
|
|
|
|
| 79 |
def visual_qna():
|
| 80 |
st.title("Visual Q&A")
|
| 81 |
img = load_image()
|
| 82 |
+
if img:
|
| 83 |
+
if query := st.chat_input("Enter your message"):
|
| 84 |
+
response = visualqna(question=query, image=img)
|
| 85 |
+
with st.chat_message("assistant"):
|
| 86 |
+
st.write(response)
|
| 87 |
+
else:
|
| 88 |
+
st.warning("Please enter an image URL and click 'Load Image' before asking a question.")
|
| 89 |
+
|
| 90 |
|
| 91 |
|
| 92 |
|