Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,15 @@ import pathlib
|
|
5 |
plt = platform.system()
|
6 |
if plt == 'Windows': pathlib.PosixPath = pathlib.WindowsPath
|
7 |
|
8 |
-
def
|
9 |
return x[0].isupper()
|
10 |
|
11 |
learn = load_learner('model.pkl')
|
12 |
|
13 |
# labels = learn.dls.vocab
|
14 |
-
#labels #['
|
15 |
|
16 |
-
categories = ('
|
17 |
|
18 |
def classify_image(img):
|
19 |
pred, idx, probs = learn.predict(img)
|
|
|
5 |
plt = platform.system()
|
6 |
if plt == 'Windows': pathlib.PosixPath = pathlib.WindowsPath
|
7 |
|
8 |
+
def is_dog(x):
|
9 |
return x[0].isupper()
|
10 |
|
11 |
learn = load_learner('model.pkl')
|
12 |
|
13 |
# labels = learn.dls.vocab
|
14 |
+
#labels #['dog', 'cat']
|
15 |
|
16 |
+
categories = ('dog', 'cat')
|
17 |
|
18 |
def classify_image(img):
|
19 |
pred, idx, probs = learn.predict(img)
|