Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -71,29 +71,6 @@ class InferenceRunner(StateManager):
|
|
71 |
|
72 |
def run_inference(self):
|
73 |
self.set_up_widgets()
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
self.col1.write("Choose from sample images:")
|
79 |
-
cols = self.col1.columns(len(self.sample_images))
|
80 |
-
for idx, sample_image_path in enumerate(self.sample_images):
|
81 |
-
with cols[idx]:
|
82 |
-
image = Image.open(sample_image_path)
|
83 |
-
image = self.resize_image(sample_image_path, 100, 100)
|
84 |
-
st.image(image)
|
85 |
-
if st.button(st.image(image), key=f'sample_{idx}'):
|
86 |
-
self.process_new_image(sample_image_path, image, kbvqa)
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
st.session_state['settings_changed'] = self.has_state_changed()
|
98 |
if st.session_state['settings_changed']:
|
99 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|
|
|
71 |
|
72 |
def run_inference(self):
|
73 |
self.set_up_widgets()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
st.session_state['settings_changed'] = self.has_state_changed()
|
75 |
if st.session_state['settings_changed']:
|
76 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|