Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -163,6 +163,20 @@ with col1:
|
|
163 |
image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
|
164 |
st.image(image, width=200)
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
with col3:
|
167 |
st.markdown(f"##### YOLOX Standard vs SAHI Prediction:")
|
168 |
static_component = image_comparison(
|
@@ -177,19 +191,7 @@ with col3:
|
|
177 |
in_memory=True,
|
178 |
)
|
179 |
|
180 |
-
col1, col2, col3 = st.columns([4, 3, 4])
|
181 |
-
with col2:
|
182 |
-
submit = st.button("🐦 Perform Prediction")
|
183 |
-
|
184 |
-
if submit:
|
185 |
-
# perform prediction
|
186 |
-
with st.spinner(
|
187 |
-
text="Downloading model weight.. "
|
188 |
-
+ st.session_state["last_spinner_texts"].get()
|
189 |
-
):
|
190 |
-
detection_model = get_model()
|
191 |
|
192 |
-
image_size = 416
|
193 |
|
194 |
with st.spinner(
|
195 |
text="Performing prediction.. " + st.session_state["last_spinner_texts"].get()
|
|
|
163 |
image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
|
164 |
st.image(image, width=200)
|
165 |
|
166 |
+
# submit button
|
167 |
+
submit = st.button("🐦 Perform Prediction")
|
168 |
+
|
169 |
+
if submit:
|
170 |
+
# perform prediction
|
171 |
+
with st.spinner(
|
172 |
+
text="Downloading model weight.. "
|
173 |
+
+ st.session_state["last_spinner_texts"].get()
|
174 |
+
):
|
175 |
+
detection_model = get_model()
|
176 |
+
|
177 |
+
image_size = 416
|
178 |
+
|
179 |
+
|
180 |
with col3:
|
181 |
st.markdown(f"##### YOLOX Standard vs SAHI Prediction:")
|
182 |
static_component = image_comparison(
|
|
|
191 |
in_memory=True,
|
192 |
)
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
|
|
195 |
|
196 |
with st.spinner(
|
197 |
text="Performing prediction.. " + st.session_state["last_spinner_texts"].get()
|