JaredBailey commited on
Commit
2ea293d
·
verified ·
1 Parent(s): 53c498c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -203,7 +203,7 @@ def tile_image(image, tile_size, overlap):
203
 
204
  if st.session_state.screen == 2:
205
  # tile images
206
- tiles = tile_image(image=st.session_state.image, tile_size=640, overlap=40)
207
 
208
  with row5_col2:
209
  st.image(st.session_state.image, use_column_width=True)
@@ -229,7 +229,7 @@ if st.session_state.screen == 2:
229
  if 'results' not in st.session_state:
230
  st.write("The model is working. Please be patient...")
231
  st.write("This process takes around 30 seconds.")
232
- st.session_state.results = st.session_state.model.predict(tiles, conf=0.5) # predict
233
  st.rerun()
234
 
235
  # plot predicted image
 
203
 
204
  if st.session_state.screen == 2:
205
  # tile images
206
+ st.session_state.tiles = tile_image(image=st.session_state.image, tile_size=640, overlap=40)
207
 
208
  with row5_col2:
209
  st.image(st.session_state.image, use_column_width=True)
 
229
  if 'results' not in st.session_state:
230
  st.write("The model is working. Please be patient...")
231
  st.write("This process takes around 30 seconds.")
232
+ st.session_state.results = st.session_state.model.predict(st.session_state.tiles[0], conf=0.5) # predict
233
  st.rerun()
234
 
235
  # plot predicted image