Spaces:
Runtime error
Runtime error
Erik Lager
commited on
Commit
·
e47236e
1
Parent(s):
6818f1f
Update app.py
Browse files
app.py
CHANGED
@@ -20,9 +20,9 @@ def classify_image(img):
|
|
20 |
pred, idx, probs = learn.predict(img)
|
21 |
return dict(zip(categories, map(float, probs)))
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
intf = gr.Interface(fn=classify_image, inputs=
|
28 |
intf.launch(share=True)
|
|
|
20 |
pred, idx, probs = learn.predict(img)
|
21 |
return dict(zip(categories, map(float, probs)))
|
22 |
|
23 |
+
input_component = gr.components.Image(shape=(192,192))
|
24 |
+
output_component = gr.components.Label()
|
25 |
+
example = ['dog.jpg']
|
26 |
|
27 |
+
intf = gr.Interface(fn=classify_image, inputs=input_component, outputs=output_component, examples=example)
|
28 |
intf.launch(share=True)
|