Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ mobile_net = tf.keras.applications.MobileNetV2()
|
|
| 12 |
def image_classifier(img):
|
| 13 |
arr = np.expand_dims(img, axis=0)
|
| 14 |
arr = tf.keras.applications.mobilenet.preprocess_input(arr)
|
| 15 |
-
prediction = mobile_net.
|
| 16 |
return {labels[i]:float(prediction[i]) for i in range(1000)}
|
| 17 |
iface = gr.Interface(
|
| 18 |
image_classifier,
|
|
|
|
| 12 |
def image_classifier(img):
|
| 13 |
arr = np.expand_dims(img, axis=0)
|
| 14 |
arr = tf.keras.applications.mobilenet.preprocess_input(arr)
|
| 15 |
+
prediction = mobile_net.predict(arr).flatten()
|
| 16 |
return {labels[i]:float(prediction[i]) for i in range(1000)}
|
| 17 |
iface = gr.Interface(
|
| 18 |
image_classifier,
|