update labels
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ def is_cat(x): return x[0].isupper()
|
|
6 |
learn_inf = load_learner('DogCat.pkl')
|
7 |
labels = learn_inf.dls.vocab
|
8 |
|
9 |
-
labels = ['Cat', '
|
10 |
|
11 |
def predict(img):
|
12 |
img = PILImage.create(img)
|
@@ -15,4 +15,4 @@ def predict(img):
|
|
15 |
|
16 |
title = "Is this image a cat?"
|
17 |
iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(512,512)), outputs=gr.outputs.Label(num_top_classes=2), title=title)
|
18 |
-
iface.launch()
|
|
|
6 |
learn_inf = load_learner('DogCat.pkl')
|
7 |
labels = learn_inf.dls.vocab
|
8 |
|
9 |
+
labels = ['Cat', 'Dog']
|
10 |
|
11 |
def predict(img):
|
12 |
img = PILImage.create(img)
|
|
|
15 |
|
16 |
title = "Is this image a cat?"
|
17 |
iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(512,512)), outputs=gr.outputs.Label(num_top_classes=2), title=title)
|
18 |
+
iface.launch(share=True)
|