CosmoAI commited on
Commit
f32eb99
·
1 Parent(s): 3bf4f99

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +8 -5
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 query := st.chat_input("Enter your message"):
83
- response = visualqna(question=query, image=img)
84
- with st.chat_message("assistant"):
85
- st.write(response)
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