m7mdal7aj commited on
Commit
6a338ab
1 Parent(s): a9a7f39

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +1 -31
my_model/tabs/run_inference.py CHANGED
@@ -77,37 +77,7 @@ class InferenceRunner(StateManager):
77
  st.session_state['settings_changed'] = self.has_state_changed()
78
  if st.session_state['settings_changed']:
79
  self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
80
-
81
-
82
-
83
-
84
-
85
-
86
- ###################################
87
- self.col1.write("Choose from sample images:")
88
- cols = self.col1.columns(len(self.sample_images))
89
- for idx, sample_image_path in enumerate(self.sample_images):
90
- with cols[idx]:
91
- image = Image.open(sample_image_path)
92
- image_for_display = copy.deepcopy(image) # resize just for the display control without changing original image
93
- image_for_display = self.resize_image(image_for_display, 500, 500)
94
- st.image(image_for_display)
95
-
96
-
97
- # Image uploader
98
- uploaded_image = self.col1.file_uploader("Or upload an Image", type=["png", "jpg", "jpeg"])
99
- image_for_display = copy.deepcopy(uploaded_image) # resize just for the display control without changing original image
100
- image_for_display = self.resize_image(image_for_display, 500, 500)
101
-
102
- ############################################
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
 
112
  st.session_state.button_label = "Reload Model" if self.is_model_loaded() and self.settings_changed else "Load Model"
113
 
 
77
  st.session_state['settings_changed'] = self.has_state_changed()
78
  if st.session_state['settings_changed']:
79
  self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
80
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  st.session_state.button_label = "Reload Model" if self.is_model_loaded() and self.settings_changed else "Load Model"
83