Spaces:
Sleeping
Sleeping
Commit ·
07e5af1
1
Parent(s): bd4d9f6
fuuuuuuu
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def classify_image(inp):
|
|
| 31 |
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
|
| 32 |
prediction = model.predict(inp).flatten()
|
| 33 |
print(prediction)
|
| 34 |
-
confidences = {labels[i]: float(prediction[i]) for i in range(
|
| 35 |
return confidences
|
| 36 |
|
| 37 |
gr.Interface(fn=classify_image,
|
|
|
|
| 31 |
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
|
| 32 |
prediction = model.predict(inp).flatten()
|
| 33 |
print(prediction)
|
| 34 |
+
confidences = {labels[i]: float(prediction[i]) for i in range(len(labels)))}
|
| 35 |
return confidences
|
| 36 |
|
| 37 |
gr.Interface(fn=classify_image,
|