arham061 commited on
Commit
c3fe550
1 Parent(s): c511ff9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,7 +5,9 @@ __all__ = ['is_rock', 'learn', 'classify_image', 'categories', 'image', 'label',
5
 
6
  def is_rock(x): return x[0].issuper()
7
 
8
- learn = load_learner(str('rps_model.pkl'))
 
 
9
 
10
 
11
  categories = ('paper', 'rock', 'scissors')
 
5
 
6
  def is_rock(x): return x[0].issuper()
7
 
8
+ import torch
9
+
10
+ learn = torch.load('rps_model.pkl', map_location=torch.device('cpu'))
11
 
12
 
13
  categories = ('paper', 'rock', 'scissors')