m7mdal7aj commited on
Commit
c7b31a6
1 Parent(s): 2997bb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -130,9 +130,12 @@ def run_inference():
130
 
131
  if 'kbvqa' not in st.session_state or st.session_state['detection_model'] != detection_model:
132
  st.session_state['detection_model'] = detection_model
133
- if load_kbvqa_model(detection_model):
134
- set_model_confidence(detection_model)
135
- image_qa_app(st.session_state['kbvqa'])
 
 
 
136
 
137
 
138
 
 
130
 
131
  if 'kbvqa' not in st.session_state or st.session_state['detection_model'] != detection_model:
132
  st.session_state['detection_model'] = detection_model
133
+ if 'model' not in st.session_state:
134
+ if st.button('Load Model'):
135
+
136
+ if load_kbvqa_model(detection_model):
137
+ set_model_confidence(detection_model)
138
+ image_qa_app(st.session_state['kbvqa'])
139
 
140
 
141