Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,9 +18,8 @@ def recognize_image(image):
|
|
18 |
print(pred)
|
19 |
return dict(zip(fruit_labels, map(float, probs)))
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
label = gr.Label()
|
24 |
examples = [
|
25 |
'test_images/test_0.jpg',
|
26 |
'test_images/test_1.jpg',
|
@@ -29,4 +28,4 @@ examples = [
|
|
29 |
]
|
30 |
|
31 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|
32 |
-
iface.launch(inline=False
|
|
|
18 |
print(pred)
|
19 |
return dict(zip(fruit_labels, map(float, probs)))
|
20 |
|
21 |
+
image = gr.inputs.Image(shape=(192,192))
|
22 |
+
label = gr.outputs.Label()
|
|
|
23 |
examples = [
|
24 |
'test_images/test_0.jpg',
|
25 |
'test_images/test_1.jpg',
|
|
|
28 |
]
|
29 |
|
30 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|
31 |
+
iface.launch(inline=False)
|