Spaces:
Runtime error
Runtime error
Commit
·
f1dea7c
1
Parent(s):
6377419
fix: changed examples back
Browse files
app.py
CHANGED
@@ -40,12 +40,12 @@ learn = load_learner('model.pkl')
|
|
40 |
categories = ('Dog', 'Cat')
|
41 |
|
42 |
def classify_image(img):
|
43 |
-
pred, idx, probs =learn.predict(img)
|
44 |
return dict(zip(categories, map(float,probs)))
|
45 |
|
46 |
image= gr.inputs.Image(shape=(192, 192))
|
47 |
label = gr.outputs.Label()
|
48 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
49 |
|
50 |
-
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=
|
51 |
intf.launch(inline=False)
|
|
|
40 |
categories = ('Dog', 'Cat')
|
41 |
|
42 |
def classify_image(img):
|
43 |
+
pred, idx, probs = learn.predict(img)
|
44 |
return dict(zip(categories, map(float,probs)))
|
45 |
|
46 |
image= gr.inputs.Image(shape=(192, 192))
|
47 |
label = gr.outputs.Label()
|
48 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
49 |
|
50 |
+
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
51 |
intf.launch(inline=False)
|