Daniel Cerda Escobar commited on
Commit
c9b5f79
·
1 Parent(s): 04b5c20

Update app file

Browse files
Files changed (1) hide show
  1. app.py +19 -18
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='large')
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 col2:
39
- st.markdown('##### 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 radio_func(option):
44
- option_to_id = {
45
- 'factory_pid.png' : 'A',
46
- 'plant_pid.png' : 'B',
47
- 'processing_pid.png' : 'C',
48
- }
49
- return option_to_id[option]
50
- radio = st.radio(
51
- 'Or select from example diagrams',
52
- options = ['factory_pid.png', 'plant_pid.png', 'processing_pid.png'],
53
- format_func = radio_func,
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