BenjiELCA commited on
Commit
8d48eae
·
1 Parent(s): 101bcd1

add signature and correct problem alignment on sidebar

Browse files
Files changed (1) hide show
  1. modules/streamlit_utils.py +10 -5
modules/streamlit_utils.py CHANGED
@@ -244,20 +244,25 @@ def display_sidebar():
244
  st.sidebar.subheader("Instructions:")
245
  st.sidebar.text("1. Upload you image")
246
  st.sidebar.text("2. Crop the image \n (try to put the BPMN diagram \n in the center of the image)")
247
- st.sidebar.text("3. Set the score threshold \n for prediction (default is 0.5)")
248
  st.sidebar.text("4. Click on 'Launch Prediction'")
249
- st.sidebar.text("5. You can now see the annotation \n and the BPMN XML result")
250
- st.sidebar.text("6. You can modify the result \n by clicking on:\n 'Method and Style modification'")
251
  st.sidebar.text("7. You can change the scale for \n the XML file and the size of \n elements (default is 1.0)")
252
  st.sidebar.text("8. You can modify with modeler \n and download the result in \n right format")
253
 
254
  st.sidebar.subheader("If there is an error, try to:")
255
  st.sidebar.text("1. Change the score threshold")
256
- st.sidebar.text("2. Re-crop the image by placing\n the BPMN diagram in the center\n of the image")
257
  st.sidebar.text("3. Re-Launch the prediction")
258
 
259
  st.sidebar.subheader("You can close this sidebar")
260
 
 
 
 
 
 
261
  def initialize_session_state():
262
  if 'pool_bboxes' not in st.session_state:
263
  st.session_state.pool_bboxes = []
@@ -343,7 +348,7 @@ def launch_prediction(cropped_image, score_threshold, is_mobile, screen_width):
343
 
344
 
345
  def modify_results(percentage_text_dist_thresh=0.5):
346
- with st.expander("Method and Style modification"):
347
  label_list = list(object_dict.values())
348
  if st.session_state.prediction['labels'][-1] == 6:
349
  bboxes = [[int(coord) for coord in box] for box in st.session_state.prediction['boxes'][:-1]]
 
244
  st.sidebar.subheader("Instructions:")
245
  st.sidebar.text("1. Upload you image")
246
  st.sidebar.text("2. Crop the image \n (try to put the BPMN diagram \n in the center of the image)")
247
+ st.sidebar.text("3. Set the score threshold for\n prediction (default is 0.5)")
248
  st.sidebar.text("4. Click on 'Launch Prediction'")
249
+ st.sidebar.text("5. You can now see the\n annotation and the BPMN XML\n result")
250
+ st.sidebar.text("6. You can modify the result \n by clicking on:\n 'Method&Style modification'")
251
  st.sidebar.text("7. You can change the scale for \n the XML file and the size of \n elements (default is 1.0)")
252
  st.sidebar.text("8. You can modify with modeler \n and download the result in \n right format")
253
 
254
  st.sidebar.subheader("If there is an error, try to:")
255
  st.sidebar.text("1. Change the score threshold")
256
+ st.sidebar.text("2. Re-crop the image by placing\n the BPMN diagram in the\n center of the image")
257
  st.sidebar.text("3. Re-Launch the prediction")
258
 
259
  st.sidebar.subheader("You can close this sidebar")
260
 
261
+ for i in range(5):
262
+ st.sidebar.subheader("")
263
+
264
+ st.sidebar.subheader("Made with ❤️ by Benjamin.K")
265
+
266
  def initialize_session_state():
267
  if 'pool_bboxes' not in st.session_state:
268
  st.session_state.pool_bboxes = []
 
348
 
349
 
350
  def modify_results(percentage_text_dist_thresh=0.5):
351
+ with st.expander("Method & Style modification"):
352
  label_list = list(object_dict.values())
353
  if st.session_state.prediction['labels'][-1] == 6:
354
  bboxes = [[int(coord) for coord in box] for box in st.session_state.prediction['boxes'][:-1]]