Spaces:
Runtime error
Runtime error
jonathanIckovich
commited on
Commit
·
ede734c
1
Parent(s):
6b12563
fix4
Browse files
app.py
CHANGED
@@ -3,8 +3,16 @@ from fastai.vision.all import *
|
|
3 |
|
4 |
model_path = Path('ImageDifferentiator.pkl')
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
labels = learn.dls.vocab
|
9 |
def predict(img):
|
10 |
|
|
|
3 |
|
4 |
model_path = Path('ImageDifferentiator.pkl')
|
5 |
|
6 |
+
|
7 |
+
|
8 |
+
# Re-save the model on a non-Windows system
|
9 |
+
learn = load_learner(model_path)
|
10 |
+
learn.export('ImageDifferentiator_export.pkl')
|
11 |
+
|
12 |
+
# Load the model using Fastai's load_learner
|
13 |
+
learn = load_learner('ImageDifferentiator_export.pkl')
|
14 |
+
labels = learn.dls.vocab
|
15 |
+
|
16 |
labels = learn.dls.vocab
|
17 |
def predict(img):
|
18 |
|