Spaces:
Sleeping
Sleeping
updated deprecated gr.input and Label and intf arguments
Browse files
app.py
CHANGED
|
@@ -8,9 +8,9 @@ def classify_image(img):
|
|
| 8 |
pred,idx,probs = learn.predict(img)
|
| 9 |
return dict(zip(categories, map(float,probs)))
|
| 10 |
|
| 11 |
-
image = gr.
|
| 12 |
-
label = gr.
|
| 13 |
examples = ['grizzly.jpg', 'black.jpg', 'teddy.jpg']
|
| 14 |
|
| 15 |
-
intf = gr.Interface(fn=classify_image,
|
| 16 |
intf.launch(inline=False)
|
|
|
|
| 8 |
pred,idx,probs = learn.predict(img)
|
| 9 |
return dict(zip(categories, map(float,probs)))
|
| 10 |
|
| 11 |
+
image = gr.Image(shape=(192,192))
|
| 12 |
+
label = gr.Label()
|
| 13 |
examples = ['grizzly.jpg', 'black.jpg', 'teddy.jpg']
|
| 14 |
|
| 15 |
+
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples = examples)
|
| 16 |
intf.launch(inline=False)
|