Spaces:
Runtime error
Runtime error
jonathanIckovich
commited on
Commit
·
6b12563
1
Parent(s):
3f19ca5
fix 3
Browse files
app.py
CHANGED
@@ -2,7 +2,9 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
|
4 |
model_path = Path('ImageDifferentiator.pkl')
|
5 |
-
|
|
|
|
|
6 |
labels = learn.dls.vocab
|
7 |
def predict(img):
|
8 |
|
|
|
2 |
from fastai.vision.all import *
|
3 |
|
4 |
model_path = Path('ImageDifferentiator.pkl')
|
5 |
+
|
6 |
+
# Explicitly specify map_location and use cpu if needed
|
7 |
+
learn = load_learner(model_path, cpu=True)
|
8 |
labels = learn.dls.vocab
|
9 |
def predict(img):
|
10 |
|