Spaces:
Runtime error
Runtime error
Commit ·
2dca684
1
Parent(s): d84c360
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ modelo =tf.keras.models.load_model('model_0.h5')
|
|
| 7 |
classes=['daisy','dandelion','roses','sunflowers','tulips']
|
| 8 |
|
| 9 |
def classifier(image):
|
| 10 |
-
pred_img =
|
| 11 |
pred_img = tf.squeeze(tf.round(pred_img))
|
| 12 |
texto = str(f'Predicted label: {classes[(np.argmax(pred_img))]}')
|
| 13 |
return texto
|
|
|
|
| 7 |
classes=['daisy','dandelion','roses','sunflowers','tulips']
|
| 8 |
|
| 9 |
def classifier(image):
|
| 10 |
+
pred_img = modelo.predict(tf.expand_dims(image,axis=0))
|
| 11 |
pred_img = tf.squeeze(tf.round(pred_img))
|
| 12 |
texto = str(f'Predicted label: {classes[(np.argmax(pred_img))]}')
|
| 13 |
return texto
|