Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
72fe07e
1
Parent(s):
83e62aa
Update app file
Browse files
app.py
CHANGED
|
@@ -34,12 +34,11 @@ with col2:
|
|
| 34 |
|
| 35 |
st.write('##')
|
| 36 |
|
| 37 |
-
col1, col2, col3, col4, col5 = st.columns([
|
| 38 |
-
with
|
| 39 |
st.markdown(f"##### Input File")
|
| 40 |
# set input image by upload
|
| 41 |
image_file = st.file_uploader("Upload your diagram", type=["pdf"])
|
| 42 |
-
with col4:
|
| 43 |
# set input images from examples
|
| 44 |
def slider_func(option):
|
| 45 |
option_to_id = {
|
|
@@ -55,9 +54,10 @@ with col4:
|
|
| 55 |
format_func = slider_func,
|
| 56 |
value = 'processing_pid.png',
|
| 57 |
)
|
|
|
|
| 58 |
# visualize input image
|
| 59 |
if image_file is not None:
|
| 60 |
image = Image.open(image_file)
|
| 61 |
else:
|
| 62 |
image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
|
| 63 |
-
st.image(image,
|
|
|
|
| 34 |
|
| 35 |
st.write('##')
|
| 36 |
|
| 37 |
+
col1, col2, col3, col4, col5 = st.columns([5, 5, 5, 5, 5])
|
| 38 |
+
with col1:
|
| 39 |
st.markdown(f"##### Input File")
|
| 40 |
# set input image by upload
|
| 41 |
image_file = st.file_uploader("Upload your diagram", type=["pdf"])
|
|
|
|
| 42 |
# set input images from examples
|
| 43 |
def slider_func(option):
|
| 44 |
option_to_id = {
|
|
|
|
| 54 |
format_func = slider_func,
|
| 55 |
value = 'processing_pid.png',
|
| 56 |
)
|
| 57 |
+
with col3:
|
| 58 |
# visualize input image
|
| 59 |
if image_file is not None:
|
| 60 |
image = Image.open(image_file)
|
| 61 |
else:
|
| 62 |
image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
|
| 63 |
+
st.image(image, use_column_width = True)
|