qisan commited on
Commit
e654eff
1 Parent(s): 635ba57

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ class_names = ['Not Depressed', 'Depressed']
11
  pt_file = hf_hub_download(repo_id="liangc40/sentimental_analysis", filename="model.pt")
12
 
13
  model = DepressionClassifier(len(class_names), 'bert-base-cased')
14
- model.load_state_dict(torch.load(pt_file))
15
 
16
 
17
 
 
11
  pt_file = hf_hub_download(repo_id="liangc40/sentimental_analysis", filename="model.pt")
12
 
13
  model = DepressionClassifier(len(class_names), 'bert-base-cased')
14
+ model.load_state_dict(torch.load(pt_file), map_location=torch.device('cpu'))
15
 
16
 
17