Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,8 +17,7 @@ labels = ['compost', 'e-waste', 'recycle', 'trash']
|
|
| 17 |
def classify_image(inp):
|
| 18 |
#inp = inp.reshape((1, 224, 224, 3))
|
| 19 |
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
|
| 20 |
-
prediction =
|
| 21 |
-
#prediction = pre_trained_model.predict(inp).flatten()
|
| 22 |
confidences = {labels[i]: float(prediction[i]) for i in range(4)}
|
| 23 |
return confidences
|
| 24 |
|
|
|
|
| 17 |
def classify_image(inp):
|
| 18 |
#inp = inp.reshape((1, 224, 224, 3))
|
| 19 |
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
|
| 20 |
+
prediction = pre_trained_model.predict(inp).flatten()
|
|
|
|
| 21 |
confidences = {labels[i]: float(prediction[i]) for i in range(4)}
|
| 22 |
return confidences
|
| 23 |
|