Spaces:
Sleeping
Sleeping
J
commited on
Commit
·
b46de0d
1
Parent(s):
a7f933e
fixed loader bug (again)
Browse files
app.py
CHANGED
@@ -2,12 +2,12 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
import PIL
|
4 |
|
|
|
|
|
5 |
learned = load_learner('model.pkl')
|
6 |
|
7 |
labels = learned.dls.vocab
|
8 |
|
9 |
-
def is_cat(x): return x[0].isupper()
|
10 |
-
|
11 |
def predict (img):
|
12 |
img = PILImage.create(img)
|
13 |
pred, pred_idx, probs = learned.predict(img)
|
|
|
2 |
from fastai.vision.all import *
|
3 |
import PIL
|
4 |
|
5 |
+
def is_cat(x): return x[0].isupper()
|
6 |
+
|
7 |
learned = load_learner('model.pkl')
|
8 |
|
9 |
labels = learned.dls.vocab
|
10 |
|
|
|
|
|
11 |
def predict (img):
|
12 |
img = PILImage.create(img)
|
13 |
pred, pred_idx, probs = learned.predict(img)
|