PrakhAI commited on
Commit
1b05f8b
·
1 Parent(s): e40af5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -40,8 +40,11 @@ if len(uploaded_files) == 0:
40
  else:
41
  input = jnp.array([jnp.array(Image.open(uploaded_file).convert("HSV").split()[2].resize((28, 28))).reshape(1, 28, 28, 1) / 255. for uploaded_file in uploaded_files])
42
  predictions = cnn.apply({"params": params}, input)
 
43
  for (image, prediction) in zip(uploaded_files, predictions):
44
  st.image(Image.open(image))
 
 
45
  st.write("Model Prediction: " + prediction.argmax(axis=0)[0])
46
 
47
 
 
40
  else:
41
  input = jnp.array([jnp.array(Image.open(uploaded_file).convert("HSV").split()[2].resize((28, 28))).reshape(1, 28, 28, 1) / 255. for uploaded_file in uploaded_files])
42
  predictions = cnn.apply({"params": params}, input)
43
+ st.write("Predictions shape: " + str(predictions.shape))
44
  for (image, prediction) in zip(uploaded_files, predictions):
45
  st.image(Image.open(image))
46
+ st.write("Prediction shape: " + str(prediction.shape))
47
+ st.write("Prediction argmax: " + str(prediction.argmax(axis=0)))
48
  st.write("Model Prediction: " + prediction.argmax(axis=0)[0])
49
 
50