Spaces:
Runtime error
Runtime error
shravankumar147
commited on
Commit
·
a179a3b
1
Parent(s):
f2505e9
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ def is_cat(x): return x[0].isupper()
|
|
5 |
|
6 |
learn = load_learner('model.pkl')
|
7 |
|
8 |
-
categories =
|
9 |
|
10 |
def classify_img(img):
|
11 |
pred, idx, probs = learn.predict(img)
|
@@ -15,5 +15,5 @@ image = gr.inputs.Image(shape=(192,192))
|
|
15 |
label = gr.outputs.Label()
|
16 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
17 |
|
18 |
-
iface = gr.Interface(fn=classify_img, inputs=image, outputs=label)
|
19 |
iface.launch()
|
|
|
5 |
|
6 |
learn = load_learner('model.pkl')
|
7 |
|
8 |
+
categories = ('Dog', 'Cat')
|
9 |
|
10 |
def classify_img(img):
|
11 |
pred, idx, probs = learn.predict(img)
|
|
|
15 |
label = gr.outputs.Label()
|
16 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
17 |
|
18 |
+
iface = gr.Interface(fn=classify_img, inputs=image, outputs=label, examples=examples)
|
19 |
iface.launch()
|