Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
c9b5f79
1
Parent(s):
04b5c20
Update app file
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ st.title('P&ID Object Detection')
|
|
| 20 |
st.subheader(' Identify valves and pumps with deep learning model ', divider='rainbow')
|
| 21 |
st.caption('Developed by Deep Drawings Co.')
|
| 22 |
|
| 23 |
-
col1, col2, col3 = st.columns(3, gap='
|
| 24 |
with col1:
|
| 25 |
with st.expander('How to use it'):
|
| 26 |
st.markdown(
|
|
@@ -35,23 +35,24 @@ with col1:
|
|
| 35 |
st.write('##')
|
| 36 |
|
| 37 |
col1, col2, col3, col4 = st.columns([1, 2, 2, 1], gap='large')
|
| 38 |
-
with
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 55 |
with col3:
|
| 56 |
st.markdown('##### Preview')
|
| 57 |
# visualize input image
|
|
|
|
| 20 |
st.subheader(' Identify valves and pumps with deep learning model ', divider='rainbow')
|
| 21 |
st.caption('Developed by Deep Drawings Co.')
|
| 22 |
|
| 23 |
+
col1, col2, col3 = st.columns(3, gap='medium')
|
| 24 |
with col1:
|
| 25 |
with st.expander('How to use it'):
|
| 26 |
st.markdown(
|
|
|
|
| 35 |
st.write('##')
|
| 36 |
|
| 37 |
col1, col2, col3, col4 = st.columns([1, 2, 2, 1], gap='large')
|
| 38 |
+
with st.container(border = True):
|
| 39 |
+
with col2:
|
| 40 |
+
st.markdown('##### Input File')
|
| 41 |
+
# set input image by upload
|
| 42 |
+
image_file = st.file_uploader("Upload your diagram", type=["pdf"])
|
| 43 |
+
# set input images from examples
|
| 44 |
+
def radio_func(option):
|
| 45 |
+
option_to_id = {
|
| 46 |
+
'factory_pid.png' : 'A',
|
| 47 |
+
'plant_pid.png' : 'B',
|
| 48 |
+
'processing_pid.png' : 'C',
|
| 49 |
+
}
|
| 50 |
+
return option_to_id[option]
|
| 51 |
+
radio = st.radio(
|
| 52 |
+
'Or select from example diagrams',
|
| 53 |
+
options = ['factory_pid.png', 'plant_pid.png', 'processing_pid.png'],
|
| 54 |
+
format_func = radio_func,
|
| 55 |
+
)
|
| 56 |
with col3:
|
| 57 |
st.markdown('##### Preview')
|
| 58 |
# visualize input image
|