lily-hust commited on
Commit
25d762f
·
1 Parent(s): 1fb43d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -26,9 +26,10 @@ model = tf.keras.models.load_model('model')
26
 
27
  with st.form("form", clear_on_submit=True):
28
  uploaded_file = st.file_uploader("Upload image files", type="jpg", accept_multiple_files=True)
29
- submitted = st.form_submit_button("Click to generate prediction")
30
  if uploaded_file is not None:
31
  st.image(uploaded_file, width=100)
 
 
32
 
33
  if submitted and uploaded_file is not None:
34
  st.write("Predicting!")
@@ -44,6 +45,6 @@ with st.form("form", clear_on_submit=True):
44
  score = predictions[0]
45
  st.markdown("Predicted class of the image {} is : {}".format(file, class_names[np.argmax(score)]))
46
 
47
- st.write("Click to clear all")
48
  uploaded_file = None
 
49
 
 
26
 
27
  with st.form("form", clear_on_submit=True):
28
  uploaded_file = st.file_uploader("Upload image files", type="jpg", accept_multiple_files=True)
 
29
  if uploaded_file is not None:
30
  st.image(uploaded_file, width=100)
31
+
32
+ submitted = st.form_submit_button("Click to generate prediction")
33
 
34
  if submitted and uploaded_file is not None:
35
  st.write("Predicting!")
 
45
  score = predictions[0]
46
  st.markdown("Predicted class of the image {} is : {}".format(file, class_names[np.argmax(score)]))
47
 
 
48
  uploaded_file = None
49
+
50