nebi commited on
Commit
33fe24f
·
verified ·
1 Parent(s): d1c3191

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -1
src/streamlit_app.py CHANGED
@@ -165,6 +165,8 @@ if 'model' not in st.session_state:
165
 
166
  st.session_state.current_prediction = None
167
 
 
 
168
 
169
  def fetch_image():
170
 
@@ -212,7 +214,7 @@ if st.session_state.current_image is not None:
212
  prediction = st.session_state.model.predict(np.array([st.session_state.current_image]))[0][0]
213
 
214
  st.session_state.current_prediction = 'dog' if prediction > 0.5 else 'cat'
215
- st.success(f"**Model Predicts:** {st.session_state.current_prediction} (cat-confidence {(1-prediction)*100:.2f}%; dog-confidence {(prediction)*100:.2f}%")
216
 
217
  st.image(st.session_state.unprocessed_image, caption="Current Image")
218
 
 
165
 
166
  st.session_state.current_prediction = None
167
 
168
+ st.session_state.label_input = None
169
+
170
 
171
  def fetch_image():
172
 
 
214
  prediction = st.session_state.model.predict(np.array([st.session_state.current_image]))[0][0]
215
 
216
  st.session_state.current_prediction = 'dog' if prediction > 0.5 else 'cat'
217
+ st.success(f"**Model Predicts:** {st.session_state.current_prediction} --- (cat-confidence {(1-prediction)*100:.2f}%; dog-confidence {(prediction)*100:.2f}%)")
218
 
219
  st.image(st.session_state.unprocessed_image, caption="Current Image")
220