m7mdal7aj commited on
Commit
0960fdc
·
verified ·
1 Parent(s): 16f7989

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -89,13 +89,15 @@ def image_qa_app(kbvqa_model):
89
  UIComponents.display_image_selection(sample_images)
90
 
91
  uploaded_image = st.file_uploader("Or upload an Image", type=["png", "jpg", "jpeg"])
92
- UIComponents.display_image(uploaded_image)
93
  if uploaded_image is not None:
94
  st.session_state['current_image'] = Image.open(uploaded_image)
95
  st.session_state['qa_history'] = []
96
  st.session_state['analysis_done'] = False
97
  st.session_state['answer_in_progress'] = False
98
 
 
 
99
  if st.session_state.get('current_image') and not st.session_state.get('analysis_done', False):
100
  if st.button('Analyze Image'):
101
  caption, detected_objects_str = ImageHandler.analyze_image(st.session_state['current_image'], kbvqa_model)
 
89
  UIComponents.display_image_selection(sample_images)
90
 
91
  uploaded_image = st.file_uploader("Or upload an Image", type=["png", "jpg", "jpeg"])
92
+
93
  if uploaded_image is not None:
94
  st.session_state['current_image'] = Image.open(uploaded_image)
95
  st.session_state['qa_history'] = []
96
  st.session_state['analysis_done'] = False
97
  st.session_state['answer_in_progress'] = False
98
 
99
+ UIComponents.display_image(st.session_state['current_image'])
100
+
101
  if st.session_state.get('current_image') and not st.session_state.get('analysis_done', False):
102
  if st.button('Analyze Image'):
103
  caption, detected_objects_str = ImageHandler.analyze_image(st.session_state['current_image'], kbvqa_model)