jonathanIckovich commited on
Commit
6b12563
·
1 Parent(s): 3f19ca5
Files changed (1) hide show
  1. app.py +3 -1
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
- learn = load_learner(model_path)
 
 
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