sylwia malinowska
commited on
Commit
•
c819b89
1
Parent(s):
52caacc
using new model
Browse files
app.py
CHANGED
@@ -2,10 +2,9 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
|
4 |
|
5 |
-
learn = load_learner('
|
6 |
|
7 |
-
categories = ('
|
8 |
-
'maine coon', 'european shorthair', 'persian')
|
9 |
|
10 |
|
11 |
def classify_image(img):
|
@@ -15,7 +14,7 @@ def classify_image(img):
|
|
15 |
|
16 |
image = gr.inputs.Image(shape=(192, 192))
|
17 |
label = gr.outputs.Label()
|
18 |
-
examples = ['
|
19 |
|
20 |
|
21 |
iface = gr.Interface(fn=classify_image, inputs=image,
|
|
|
2 |
from fastai.vision.all import *
|
3 |
|
4 |
|
5 |
+
learn = load_learner('cat.pkl')
|
6 |
|
7 |
+
categories = ('british shorthair', 'maine coon', 'european shorthair')
|
|
|
8 |
|
9 |
|
10 |
def classify_image(img):
|
|
|
14 |
|
15 |
image = gr.inputs.Image(shape=(192, 192))
|
16 |
label = gr.outputs.Label()
|
17 |
+
examples = ['british.jpg', 'maine-coon.jpg', 'european.jpg']
|
18 |
|
19 |
|
20 |
iface = gr.Interface(fn=classify_image, inputs=image,
|