PrakhAI commited on
Commit
8371afc
·
1 Parent(s): f3f3279

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ else:
44
  for uploaded_file in uploaded_files:
45
  img = Image.open(uploaded_file)
46
  st.image(img)
47
- input = tf.image_resize(tf.convert_to_tensor(img), [50, 50])
48
  st.write("Model Prediction: " + cnn.apply({"params": params}, input))
49
  st.write("Model Prediction type: " + type(cnn.apply({"params": params}, input)))
50
  st.write("Model Prediction type dir: " + dir(cnn.apply({"params": params}, input)))
 
44
  for uploaded_file in uploaded_files:
45
  img = Image.open(uploaded_file)
46
  st.image(img)
47
+ input = tf.cast(tf.image.resize(tf.convert_to_tensor(img), [50, 50]), tf.float32) / 255.
48
  st.write("Model Prediction: " + cnn.apply({"params": params}, input))
49
  st.write("Model Prediction type: " + type(cnn.apply({"params": params}, input)))
50
  st.write("Model Prediction type dir: " + dir(cnn.apply({"params": params}, input)))