Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
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 |
|