Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -11,6 +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, map_location=torch.device('cpu')))
15
 
16
 
 
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 = model.to('cpu')
15
  model.load_state_dict(torch.load(pt_file, map_location=torch.device('cpu')))
16
 
17