Spaces:
Runtime error
Runtime error
Update Gradio API of image() and label()
Browse files
app.py
CHANGED
@@ -17,10 +17,10 @@ categories = ['Godzilla', 'King Kong']
|
|
17 |
def classify_kaiju(img):
|
18 |
pred,idx,probs=learn.predict(img)
|
19 |
return dict(zip(categories, map(float,probs)))
|
20 |
-
|
21 |
# %% ../app.ipynb 16
|
22 |
-
image = gr.
|
23 |
-
label = gr.
|
24 |
examples = ['Godzilla_1.jpg', 'KingKong_1.jpg', 'Godzilla_2.jpg', 'KingKong_2.jpg']
|
25 |
|
26 |
intf = gr.Interface(fn=classify_kaiju, inputs=image, outputs=label, examples=examples)
|
|
|
17 |
def classify_kaiju(img):
|
18 |
pred,idx,probs=learn.predict(img)
|
19 |
return dict(zip(categories, map(float,probs)))
|
20 |
+
|
21 |
# %% ../app.ipynb 16
|
22 |
+
image = gr.Image()
|
23 |
+
label = gr.Label()
|
24 |
examples = ['Godzilla_1.jpg', 'KingKong_1.jpg', 'Godzilla_2.jpg', 'KingKong_2.jpg']
|
25 |
|
26 |
intf = gr.Interface(fn=classify_kaiju, inputs=image, outputs=label, examples=examples)
|