Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ from fastai.vision.all import *
|
|
4 |
|
5 |
def is_cat(x):return x[0].isupper()
|
6 |
learn = load_learner('model.pkl')
|
7 |
-
learn.predict(im)
|
8 |
categories = ('Dog', 'Cat')
|
9 |
def classify_image(img):
|
10 |
pred,idx,probs = learn.predict(img)
|
@@ -14,4 +13,4 @@ def classify_image(img):
|
|
14 |
image = gr.inputs.Image(shape=(192, 192))
|
15 |
label = gr.outputs.Label()
|
16 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label)
|
17 |
-
intf.launch()
|
|
|
4 |
|
5 |
def is_cat(x):return x[0].isupper()
|
6 |
learn = load_learner('model.pkl')
|
|
|
7 |
categories = ('Dog', 'Cat')
|
8 |
def classify_image(img):
|
9 |
pred,idx,probs = learn.predict(img)
|
|
|
13 |
image = gr.inputs.Image(shape=(192, 192))
|
14 |
label = gr.outputs.Label()
|
15 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label)
|
16 |
+
intf.launch(inline=False)
|