Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -17,14 +17,9 @@ class InferenceRunner(StateManager):
|
|
17 |
def __init__(self):
|
18 |
|
19 |
super().__init__()
|
20 |
-
st.title("Run Inference")
|
21 |
-
st.write("Please note that this is not a general purpose mode, it is specifically trained on [OK-VQA Dataset](https://okvqa.allenai.org/) and desgined to give short and direct answers to the given questions about the given image")
|
22 |
self.initialize_state()
|
23 |
self.sample_images = [
|
24 |
-
"Files/sample1.jpg", "Files/sample2.jpg", "Files/sample3.jpg"
|
25 |
-
"Files/sample4.jpg", "Files/sample5.jpg", "Files/sample6.jpg",
|
26 |
-
"Files/sample7.jpg"
|
27 |
-
]
|
28 |
|
29 |
def answer_question(self, caption, detected_objects_str, question, model):
|
30 |
free_gpu_resources()
|
@@ -74,7 +69,6 @@ class InferenceRunner(StateManager):
|
|
74 |
|
75 |
|
76 |
def run_inference(self):
|
77 |
-
|
78 |
self.set_up_widgets()
|
79 |
st.session_state['settings_changed'] = self.has_state_changed()
|
80 |
if st.session_state['settings_changed']:
|
|
|
17 |
def __init__(self):
|
18 |
|
19 |
super().__init__()
|
|
|
|
|
20 |
self.initialize_state()
|
21 |
self.sample_images = [
|
22 |
+
"Files/sample1.jpg", "Files/sample2.jpg", "Files/sample3.jpg"]
|
|
|
|
|
|
|
23 |
|
24 |
def answer_question(self, caption, detected_objects_str, question, model):
|
25 |
free_gpu_resources()
|
|
|
69 |
|
70 |
|
71 |
def run_inference(self):
|
|
|
72 |
self.set_up_widgets()
|
73 |
st.session_state['settings_changed'] = self.has_state_changed()
|
74 |
if st.session_state['settings_changed']:
|