Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
3724f34
1
Parent(s):
3a93a98
Refresh front
Browse files
app.py
CHANGED
@@ -157,47 +157,15 @@ if submit:
|
|
157 |
|
158 |
st.write('##')
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
.stImageComparison > div {
|
170 |
-
width: 100%; /* Make the container responsive */
|
171 |
-
max-width: 90vw; /* Max width as 90% of the viewport width */
|
172 |
-
margin-left: auto; /* Center the widget horizontally */
|
173 |
-
margin-right: auto;
|
174 |
-
padding: 10px; /* Optional padding around the images */
|
175 |
-
border: 3px solid #000; /* Add a black border around the widget */
|
176 |
-
border-radius: 10px; /* Optional: Rounded corners */
|
177 |
-
background-color: #f7f7f7; /* Optional: Background color for contrast */
|
178 |
-
}
|
179 |
-
|
180 |
-
/* Target the images inside the comparison */
|
181 |
-
.stImageComparison > div img {
|
182 |
-
width: 100%; /* Images take up 100% of the container's width */
|
183 |
-
height: auto; /* Maintain aspect ratio */
|
184 |
-
border-radius: 8px; /* Optional: Rounded corners for images */
|
185 |
-
}
|
186 |
-
</style>
|
187 |
-
""",
|
188 |
-
unsafe_allow_html=True
|
189 |
-
)
|
190 |
-
|
191 |
-
# Display the image comparison widget with the resized images
|
192 |
-
image_comparison(
|
193 |
-
st.session_state["output_1"],
|
194 |
-
st.session_state["output_2"]
|
195 |
-
)
|
196 |
-
|
197 |
-
#col1, col2, col3 = st.columns([1, 10, 1], gap='small')
|
198 |
-
#with col2:
|
199 |
-
#st.markdown(f"#### Object Detection Result")
|
200 |
-
#with st.container(border = True):
|
201 |
# static_component = image_comparison(
|
202 |
# img1=st.session_state["output_1"],
|
203 |
# img2=st.session_state["output_2"],
|
|
|
157 |
|
158 |
st.write('##')
|
159 |
|
160 |
+
col1, col2, col3 = st.columns([1, 8, 1], gap='small')
|
161 |
+
with col2:
|
162 |
+
st.markdown(f"#### Object Detection Result")
|
163 |
+
with st.container(border = True):
|
164 |
+
tab1, tab2 = st.tabs(['Original Image','Inference Prediction'])
|
165 |
+
with tab1:
|
166 |
+
st.image(st.session_state["output_1"])
|
167 |
+
with tab2:
|
168 |
+
st.image(st.session_state["output_2"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
# static_component = image_comparison(
|
170 |
# img1=st.session_state["output_1"],
|
171 |
# img2=st.session_state["output_2"],
|