JaredBailey commited on
Commit
4d1a312
·
verified ·
1 Parent(s): c2ef2ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -142,7 +142,7 @@ if st.session_state.image is not None:
142
 
143
  # predictions
144
  if 'results' not in st.session_state:
145
- st.session_state.results = st.session_state.model.predict(tiles) # predict
146
 
147
 
148
  _, row4_col2, row4_col3, _ = st.columns([1,4,4,1], gap="medium")
@@ -160,7 +160,7 @@ if st.session_state.image is not None:
160
  st.session_state.image_counter += 1
161
 
162
  # Plot predicted image
163
- im_bgr = st.session_state.results[st.session_state.image_counter].plot(line_width=10) # BGR-order numpy array
164
  im_rgb = Image.fromarray(im_bgr[..., ::-1]) # RGB-order PIL image
165
  st.image(im_rgb)
166
 
 
142
 
143
  # predictions
144
  if 'results' not in st.session_state:
145
+ st.session_state.results = st.session_state.model.predict(tiles, conf=0.5) # predict
146
 
147
 
148
  _, row4_col2, row4_col3, _ = st.columns([1,4,4,1], gap="medium")
 
160
  st.session_state.image_counter += 1
161
 
162
  # Plot predicted image
163
+ im_bgr = st.session_state.results[st.session_state.image_counter].plot() # BGR-order numpy array
164
  im_rgb = Image.fromarray(im_bgr[..., ::-1]) # RGB-order PIL image
165
  st.image(im_rgb)
166