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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -7,7 +7,12 @@ 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')
 
7
 
8
  import torch
9
 
10
+ import pathlib
11
+
12
+ plt = platform.system()
13
+ if plt == 'Windows': pathlib.WindowsPath = pathlib.PosixPath
14
+
15
+ learn = load_learner('rps_model.pkl')
16
 
17
 
18
  categories = ('paper', 'rock', 'scissors')