BenjiELCA commited on
Commit
9ff1243
·
1 Parent(s): 822792a

correction bug

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -285,7 +285,10 @@ def main():
285
  st.sidebar.text("6. You can now see the annotation \n and the BPMN XML result")
286
  st.sidebar.text("7. You can modify and download \n the result in right format")
287
 
288
- st.sidebar.text("If there is an error, try to:\n change the score threshold \n recrop the image.")
 
 
 
289
 
290
  st.sidebar.subheader("You can close this sidebar")
291
 
@@ -341,6 +344,10 @@ def main():
341
  perform_inference(model_object, model_arrow, st.session_state.crop_image, score_threshold)
342
  st.session_state.prediction = modif_box_pos(st.session_state.prediction, object_dict)
343
  st.balloons()
 
 
 
 
344
 
345
 
346
  # If the prediction has been made and the user has uploaded an image, display the options for the user to annotate the image
 
285
  st.sidebar.text("6. You can now see the annotation \n and the BPMN XML result")
286
  st.sidebar.text("7. You can modify and download \n the result in right format")
287
 
288
+ st.sidebar.subheader("If there is an error, try to:")
289
+ st.sidebar.text("1. Change the score threshold")
290
+ st.sidebar.text("2. Re-crop the image by placing\n the BPMN diagram in the center\n of the image")
291
+ st.sidebar.text("3. Re-Launch the prediction")
292
 
293
  st.sidebar.subheader("You can close this sidebar")
294
 
 
344
  perform_inference(model_object, model_arrow, st.session_state.crop_image, score_threshold)
345
  st.session_state.prediction = modif_box_pos(st.session_state.prediction, object_dict)
346
  st.balloons()
347
+ else:
348
+ #delete the prediction
349
+ if 'prediction' in st.session_state:
350
+ del st.session_state['prediction']
351
 
352
 
353
  # If the prediction has been made and the user has uploaded an image, display the options for the user to annotate the image