m7mdal7aj commited on
Commit
a11ed8b
1 Parent(s): f45bd95

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +4 -1
my_model/tabs/run_inference.py CHANGED
@@ -13,7 +13,7 @@ from my_model.gen_utilities import free_gpu_resources
13
  from my_model.KBVQA import KBVQA, prepare_kbvqa_model
14
  from my_model.utilities.state_manager import StateManager
15
 
16
- state_manager = StateManager()
17
 
18
  def answer_question(caption, detected_objects_str, question, model):
19
  free_gpu_resources()
@@ -94,6 +94,9 @@ def process_new_image(image_key, image, kbvqa):
94
  }
95
 
96
  def run_inference():
 
 
 
97
  st.title("Run Inference")
98
 
99
  st.selectbox("Choose a method:", ["Fine-Tuned Model", "In-Context Learning (n-shots)"], index=0, key='method')
 
13
  from my_model.KBVQA import KBVQA, prepare_kbvqa_model
14
  from my_model.utilities.state_manager import StateManager
15
 
16
+
17
 
18
  def answer_question(caption, detected_objects_str, question, model):
19
  free_gpu_resources()
 
94
  }
95
 
96
  def run_inference():
97
+ global state_manager
98
+ state_manager = StateManager()
99
+
100
  st.title("Run Inference")
101
 
102
  st.selectbox("Choose a method:", ["Fine-Tuned Model", "In-Context Learning (n-shots)"], index=0, key='method')