nebi commited on
Commit
a7c365c
·
verified ·
1 Parent(s): f1be0ac

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -5
src/streamlit_app.py CHANGED
@@ -167,6 +167,8 @@ if 'model' not in st.session_state:
167
 
168
  st.session_state.label_input = None
169
 
 
 
170
 
171
  def fetch_image():
172
  print("entering fetch_image")
@@ -189,9 +191,7 @@ def fetch_image():
189
  # Button to fetch a new image
190
  col1, col2, col3 = st.columns([1,1,1])
191
 
192
- if st.session_state.current_image is None:
193
- st.session_state.started=False
194
- else:
195
  st.session_state.started=True
196
 
197
  with col1:
@@ -259,9 +259,9 @@ if st.session_state.current_image is not None:
259
 
260
 
261
  st.session_state.model.fit(image, label, epochs=1, verbose=0)
262
- #st.session_state.unprocessed_image=None
263
  fetch_image()
264
- st.rerun()
265
 
266
 
267
 
 
167
 
168
  st.session_state.label_input = None
169
 
170
+ st.session_state.started=False
171
+
172
 
173
  def fetch_image():
174
  print("entering fetch_image")
 
191
  # Button to fetch a new image
192
  col1, col2, col3 = st.columns([1,1,1])
193
 
194
+ if st.session_state.current_image is not None and st.session_state.started is False:
 
 
195
  st.session_state.started=True
196
 
197
  with col1:
 
259
 
260
 
261
  st.session_state.model.fit(image, label, epochs=1, verbose=0)
262
+ st.session_state.unprocessed_image=None
263
  fetch_image()
264
+ #st.rerun()
265
 
266
 
267