Spaces:
Running
Running
modify the position of the scale selection
Browse files
app.py
CHANGED
@@ -281,9 +281,9 @@ def main():
|
|
281 |
st.sidebar.text("1. Upload you image")
|
282 |
st.sidebar.text("2. Crop the image \n (try to put the BPMN diagram \n in the center of the image)")
|
283 |
st.sidebar.text("3. Set the score threshold \n for prediction (default is 0.5)")
|
284 |
-
st.sidebar.text("4.
|
285 |
-
st.sidebar.text("5.
|
286 |
-
st.sidebar.text("6. You can
|
287 |
st.sidebar.text("7. You can modify and download \n the result in right format")
|
288 |
|
289 |
st.sidebar.subheader("If there is an error, try to:")
|
@@ -349,9 +349,7 @@ def main():
|
|
349 |
col1, col2, col3 = st.columns(3)
|
350 |
with col1:
|
351 |
score_threshold = st.slider("Set score threshold for prediction", min_value=0.0, max_value=1.0, value=0.5, step=0.05)
|
352 |
-
|
353 |
-
st.session_state.scale = st.slider("Set scale for XML file", min_value=0.1, max_value=2.0, value=1.0, step=0.1)
|
354 |
-
|
355 |
# Launch the prediction when the user clicks the button
|
356 |
if st.button("Launch Prediction"):
|
357 |
st.session_state.crop_image = cropped_image
|
@@ -373,6 +371,9 @@ def main():
|
|
373 |
|
374 |
#if st.session_state.prediction_up==True:
|
375 |
with st.spinner('Waiting for BPMN modeler...'):
|
|
|
|
|
|
|
376 |
st.session_state.bpmn_xml = create_XML(st.session_state.prediction.copy(), st.session_state.text_mapping, st.session_state.scale)
|
377 |
display_bpmn_xml(st.session_state.bpmn_xml)
|
378 |
|
|
|
281 |
st.sidebar.text("1. Upload you image")
|
282 |
st.sidebar.text("2. Crop the image \n (try to put the BPMN diagram \n in the center of the image)")
|
283 |
st.sidebar.text("3. Set the score threshold \n for prediction (default is 0.5)")
|
284 |
+
st.sidebar.text("4. Click on 'Launch Prediction'")
|
285 |
+
st.sidebar.text("5. You can now see the annotation \n and the BPMN XML result")
|
286 |
+
st.sidebar.text("6. You can change the scale for \n the XML file (default is 1.0)")
|
287 |
st.sidebar.text("7. You can modify and download \n the result in right format")
|
288 |
|
289 |
st.sidebar.subheader("If there is an error, try to:")
|
|
|
349 |
col1, col2, col3 = st.columns(3)
|
350 |
with col1:
|
351 |
score_threshold = st.slider("Set score threshold for prediction", min_value=0.0, max_value=1.0, value=0.5, step=0.05)
|
352 |
+
|
|
|
|
|
353 |
# Launch the prediction when the user clicks the button
|
354 |
if st.button("Launch Prediction"):
|
355 |
st.session_state.crop_image = cropped_image
|
|
|
371 |
|
372 |
#if st.session_state.prediction_up==True:
|
373 |
with st.spinner('Waiting for BPMN modeler...'):
|
374 |
+
col1, col2 = st.columns(2)
|
375 |
+
with col1:
|
376 |
+
st.session_state.scale = st.slider("Set scale for XML file", min_value=0.1, max_value=2.0, value=1.0, step=0.1)
|
377 |
st.session_state.bpmn_xml = create_XML(st.session_state.prediction.copy(), st.session_state.text_mapping, st.session_state.scale)
|
378 |
display_bpmn_xml(st.session_state.bpmn_xml)
|
379 |
|