Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def predict_image(image):
|
|
| 30 |
image = tf.keras.preprocessing.image.load_img(image_bytes, target_size=(256, 256))
|
| 31 |
|
| 32 |
img_array = preprocess_image(image)
|
| 33 |
-
outputs = model(img_array)
|
| 34 |
predictions = tf.nn.softmax(outputs.logits, axis=-1)
|
| 35 |
predicted_class = np.argmax(predictions)
|
| 36 |
#confidence = float(np.max(predictions))
|
|
|
|
| 30 |
image = tf.keras.preprocessing.image.load_img(image_bytes, target_size=(256, 256))
|
| 31 |
|
| 32 |
img_array = preprocess_image(image)
|
| 33 |
+
outputs = model.predict(img_array)
|
| 34 |
predictions = tf.nn.softmax(outputs.logits, axis=-1)
|
| 35 |
predicted_class = np.argmax(predictions)
|
| 36 |
#confidence = float(np.max(predictions))
|