Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ def is_cat(x): return x[0].isupper()
|
|
| 7 |
learn = load_learner('model.pkl')
|
| 8 |
|
| 9 |
# Cell
|
| 10 |
-
categories = ('Cat', 'Not
|
| 11 |
|
| 12 |
def classify_image(img):
|
| 13 |
pred,idx,probs = learn.predict(img)
|
|
@@ -16,7 +16,7 @@ def classify_image(img):
|
|
| 16 |
# Cell
|
| 17 |
image = gr.inputs.Image(shape=(192, 192))
|
| 18 |
label = gr.outputs.Label()
|
| 19 |
-
|
| 20 |
|
| 21 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 22 |
intf.launch(inline=False)
|
|
|
|
| 7 |
learn = load_learner('model.pkl')
|
| 8 |
|
| 9 |
# Cell
|
| 10 |
+
categories = ('Cat', 'Not Cat')
|
| 11 |
|
| 12 |
def classify_image(img):
|
| 13 |
pred,idx,probs = learn.predict(img)
|
|
|
|
| 16 |
# Cell
|
| 17 |
image = gr.inputs.Image(shape=(192, 192))
|
| 18 |
label = gr.outputs.Label()
|
| 19 |
+
examples = ['forest.jpg', 'cat.jpg']
|
| 20 |
|
| 21 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 22 |
intf.launch(inline=False)
|