Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,13 +130,13 @@ with st.expander("Instructions for Use"):
|
|
130 |
|
131 |
st.write("##")
|
132 |
|
133 |
-
col1, col2, col3 = st.columns([3, 1,
|
134 |
with col1:
|
135 |
st.markdown(f"##### Set input image:")
|
136 |
|
137 |
# set input image by upload
|
138 |
image_file = st.file_uploader(
|
139 |
-
"Upload an image
|
140 |
)
|
141 |
|
142 |
# set input image from exapmles
|
@@ -150,7 +150,7 @@ with col1:
|
|
150 |
return option_to_id[option]
|
151 |
|
152 |
slider = st.select_slider(
|
153 |
-
"Or select from
|
154 |
options=["apple_tree.jpg", "highway.jpg", "highway2.jpg", "highway3.jpg"],
|
155 |
format_func=slider_func,
|
156 |
value="highway2.jpg",
|
@@ -161,7 +161,7 @@ with col1:
|
|
161 |
image = Image.open(image_file)
|
162 |
else:
|
163 |
image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
|
164 |
-
st.image(image, width=
|
165 |
|
166 |
with col3:
|
167 |
st.markdown(f"##### YOLOX Standard vs SAHI Prediction:")
|
@@ -170,7 +170,7 @@ with col3:
|
|
170 |
img2=st.session_state["output_2"],
|
171 |
label1="YOLOX",
|
172 |
label2="SAHI+YOLOX",
|
173 |
-
width=
|
174 |
starting_position=50,
|
175 |
show_labels=True,
|
176 |
make_responsive=True,
|
|
|
130 |
|
131 |
st.write("##")
|
132 |
|
133 |
+
col1, col2, col3 = st.columns([3, 1, 6])
|
134 |
with col1:
|
135 |
st.markdown(f"##### Set input image:")
|
136 |
|
137 |
# set input image by upload
|
138 |
image_file = st.file_uploader(
|
139 |
+
"Upload an image:", type=["jpg", "jpeg", "png"]
|
140 |
)
|
141 |
|
142 |
# set input image from exapmles
|
|
|
150 |
return option_to_id[option]
|
151 |
|
152 |
slider = st.select_slider(
|
153 |
+
"Or select from our sample images:",
|
154 |
options=["apple_tree.jpg", "highway.jpg", "highway2.jpg", "highway3.jpg"],
|
155 |
format_func=slider_func,
|
156 |
value="highway2.jpg",
|
|
|
161 |
image = Image.open(image_file)
|
162 |
else:
|
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:")
|
|
|
170 |
img2=st.session_state["output_2"],
|
171 |
label1="YOLOX",
|
172 |
label2="SAHI+YOLOX",
|
173 |
+
width=600,
|
174 |
starting_position=50,
|
175 |
show_labels=True,
|
176 |
make_responsive=True,
|