Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,12 +40,9 @@ 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 |
-
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
|
47 |
-
st.write("Prediction argmax: " + str(prediction.argmax(axis=0)))
|
48 |
-
st.write("Model Prediction: " + prediction.argmax(axis=0)[0])
|
49 |
|
50 |
|
51 |
def gridify(kernel, grid, kernel_size, scaling=5, padding=1):
|
|
|
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())
|
|
|
|
|
46 |
|
47 |
|
48 |
def gridify(kernel, grid, kernel_size, scaling=5, padding=1):
|