Spaces:
Running
Running
mobile friendly
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ from glob import glob
|
|
12 |
|
13 |
from streamlit_image_annotation import detection
|
14 |
from modules.toXML import create_XML
|
|
|
|
|
15 |
|
16 |
def configure_page():
|
17 |
st.set_page_config(layout="wide")
|
@@ -113,10 +115,7 @@ def launch_prediction(cropped_image, score_threshold, is_mobile, screen_width):
|
|
113 |
)
|
114 |
st.balloons()
|
115 |
|
116 |
-
|
117 |
-
from modules.utils import class_dict
|
118 |
-
from modules.eval import develop_prediction, generate_data
|
119 |
-
from modules.utils import class_dict
|
120 |
def modify_results(percentage_text_dist_thresh=0.5):
|
121 |
with st.expander("Method and Style modification (beta version)"):
|
122 |
label_list = list(class_dict.values())
|
@@ -161,10 +160,15 @@ def display_bpmn_modeler(is_mobile, screen_width):
|
|
161 |
display_bpmn_xml(st.session_state.bpmn_xml, is_mobile=is_mobile, screen_width=int(4/5 * screen_width))
|
162 |
|
163 |
def modeler_options(is_mobile):
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
def main():
|
170 |
is_mobile, screen_width = configure_page()
|
@@ -197,8 +201,8 @@ def main():
|
|
197 |
if not is_mobile:
|
198 |
modify_results()
|
199 |
|
200 |
-
|
201 |
-
|
202 |
|
203 |
display_bpmn_modeler(is_mobile, screen_width)
|
204 |
|
|
|
12 |
|
13 |
from streamlit_image_annotation import detection
|
14 |
from modules.toXML import create_XML
|
15 |
+
from modules.eval import develop_prediction, generate_data
|
16 |
+
from modules.utils import class_dict
|
17 |
|
18 |
def configure_page():
|
19 |
st.set_page_config(layout="wide")
|
|
|
115 |
)
|
116 |
st.balloons()
|
117 |
|
118 |
+
|
|
|
|
|
|
|
119 |
def modify_results(percentage_text_dist_thresh=0.5):
|
120 |
with st.expander("Method and Style modification (beta version)"):
|
121 |
label_list = list(class_dict.values())
|
|
|
160 |
display_bpmn_xml(st.session_state.bpmn_xml, is_mobile=is_mobile, screen_width=int(4/5 * screen_width))
|
161 |
|
162 |
def modeler_options(is_mobile):
|
163 |
+
if not is_mobile:
|
164 |
+
with st.expander("Options for BPMN modeler"):
|
165 |
+
col1, col2 = st.columns(2)
|
166 |
+
with col1:
|
167 |
+
st.session_state.scale = st.slider("Set distance scale for XML file", min_value=0.1, max_value=2.0, value=1.0, step=0.1)
|
168 |
+
st.session_state.size_scale = st.slider("Set size object scale for XML file", min_value=0.5, max_value=2.0, value=1.0, step=0.1)
|
169 |
+
else:
|
170 |
+
st.session_state.scale = 1.0
|
171 |
+
st.session_state.size_scale = 1.0
|
172 |
|
173 |
def main():
|
174 |
is_mobile, screen_width = configure_page()
|
|
|
201 |
if not is_mobile:
|
202 |
modify_results()
|
203 |
|
204 |
+
modeler_options(is_mobile)
|
205 |
+
|
206 |
|
207 |
display_bpmn_modeler(is_mobile, screen_width)
|
208 |
|