Daniel Cerda Escobar commited on
Commit
9af4bab
·
1 Parent(s): 1fc6f1f

Update app file

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -21,7 +21,7 @@ st.title('P&ID Object Detection')
21
  st.subheader(' Identify valves and pumps with deep learning model ', divider='rainbow')
22
  st.caption('Developed by Deep Drawings Co.')
23
 
24
- col1, col2, col3 = st.columns(3, gap='medium')
25
  with col1:
26
  with st.expander('How to use it'):
27
  st.markdown(
@@ -35,8 +35,8 @@ with col1:
35
 
36
  st.write('##')
37
 
38
- col1, col2, col3, col4 = st.columns([1, 2, 2, 1], gap='large')
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"])
@@ -53,7 +53,7 @@ with col2:
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
59
  if image_file is not None:
@@ -62,11 +62,8 @@ with col3:
62
  image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[radio])
63
  with st.container(border = True):
64
  st.image(image, use_column_width = True)
65
-
66
- st.write('##')
67
-
68
- col1, col2, col3 = st.columns(3, gap='medium')
69
- with col2:
70
  st.markdown('#### Set model parameters')
71
  postprocess_match_threshold = st.slider(
72
  label = 'Select confidence threshold',
@@ -74,4 +71,4 @@ with col2:
74
  max_value = 1.0,
75
  value = 0.8,
76
  step = 0.05
77
- )
 
21
  st.subheader(' Identify valves and pumps with deep learning model ', divider='rainbow')
22
  st.caption('Developed by Deep Drawings Co.')
23
 
24
+ col1, col2, col3 = st.columns(3, gap='large')
25
  with col1:
26
  with st.expander('How to use it'):
27
  st.markdown(
 
35
 
36
  st.write('##')
37
 
38
+ col1, col2, col3 = st.columns(3, gap='large')
39
+ with col1:
40
  st.markdown('##### Input File')
41
  # set input image by upload
42
  image_file = st.file_uploader("Upload your diagram", type=["pdf"])
 
53
  options = ['factory_pid.png', 'plant_pid.png', 'processing_pid.png'],
54
  format_func = radio_func,
55
  )
56
+ with col2:
57
  st.markdown('##### Preview')
58
  # visualize input image
59
  if image_file is not None:
 
62
  image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[radio])
63
  with st.container(border = True):
64
  st.image(image, use_column_width = True)
65
+
66
+ with col3:
 
 
 
67
  st.markdown('#### Set model parameters')
68
  postprocess_match_threshold = st.slider(
69
  label = 'Select confidence threshold',
 
71
  max_value = 1.0,
72
  value = 0.8,
73
  step = 0.05
74
+ )