shashichilappagari commited on
Commit
f847c42
1 Parent(s): 1a288da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -11,6 +11,8 @@ with st.sidebar:
11
  runtime_agent_device=st.radio("Choose runtime agent device combo",("N2X-ORCA1","TFLite-EdgeTPU","OpenVINO-CPU"),index=0,horizontal=True)
12
  activation_option=st.radio( 'Select activation function', ['relu6', 'silu'],horizontal=True)
13
  dataset_option=st.radio( 'Select a dataset option', ['coco', 'face','lp','car','hand'],horizontal=True)
 
 
14
  runtime_agent,device=runtime_agent_device.split('-')[0],runtime_agent_device.split('-')[1]
15
  model_options=zoo.list_models(device=device,runtime=runtime_agent)
16
  st.header('Choose and Run a Model')
@@ -25,10 +27,13 @@ with st.form("model_form"):
25
  uploaded_file=st.file_uploader('input image')
26
  submitted = st.form_submit_button("Submit")
27
  if submitted:
28
- model=zoo.load_model(model_name)
29
- model.overlay_font_scale=3
30
- model.overlay_line_width=6
31
- model.image_backend='pil'
 
 
 
32
  if model.output_postprocess_type=='PoseDetection':
33
  model.overlay_show_labels=False
34
  st.write("Model loaded successfully")
 
11
  runtime_agent_device=st.radio("Choose runtime agent device combo",("N2X-ORCA1","TFLite-EdgeTPU","OpenVINO-CPU"),index=0,horizontal=True)
12
  activation_option=st.radio( 'Select activation function', ['relu6', 'silu'],horizontal=True)
13
  dataset_option=st.radio( 'Select a dataset option', ['coco', 'face','lp','car','hand'],horizontal=True)
14
+ show_labels=st.toggle('Show labels in output',value=True)
15
+ show_probabilities=st.toggle('Show probabilities in output',value=False)
16
  runtime_agent,device=runtime_agent_device.split('-')[0],runtime_agent_device.split('-')[1]
17
  model_options=zoo.list_models(device=device,runtime=runtime_agent)
18
  st.header('Choose and Run a Model')
 
27
  uploaded_file=st.file_uploader('input image')
28
  submitted = st.form_submit_button("Submit")
29
  if submitted:
30
+ model=zoo.load_model(model_name,
31
+ overlay_show_labels=show_labels,
32
+ overlay_show_probabilities=show_probabilities,
33
+ overlay_font_scale=3,
34
+ overlay_line_width=6
35
+ image_backend='pil'
36
+ )
37
  if model.output_postprocess_type=='PoseDetection':
38
  model.overlay_show_labels=False
39
  st.write("Model loaded successfully")