Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,10 +28,10 @@ class BertModel(torch.nn.Module):
|
|
28 |
return output
|
29 |
|
30 |
model_preamble = BertModel()
|
31 |
-
model_preamble = torch.load("nerbert_preamble.pt")
|
32 |
|
33 |
model_judgment = BertModel()
|
34 |
-
model_judgment = torch.load("nerbert.pt")
|
35 |
|
36 |
|
37 |
unique_labels_preamble = {'I-PETITIONER', 'I-COURT', 'B-COURT', 'B-JUDGE', 'I-LAWYER', 'B-RESPONDENT', 'I-JUDGE', 'B-PETITIONER', 'I-RESPONDENT', 'B-LAWYER', 'O'}
|
|
|
28 |
return output
|
29 |
|
30 |
model_preamble = BertModel()
|
31 |
+
model_preamble = torch.load("nerbert_preamble.pt", map_location=torch.device('cpu'))
|
32 |
|
33 |
model_judgment = BertModel()
|
34 |
+
model_judgment = torch.load("nerbert.pt", map_location=torch.device('cpu'))
|
35 |
|
36 |
|
37 |
unique_labels_preamble = {'I-PETITIONER', 'I-COURT', 'B-COURT', 'B-JUDGE', 'I-LAWYER', 'B-RESPONDENT', 'I-JUDGE', 'B-PETITIONER', 'I-RESPONDENT', 'B-LAWYER', 'O'}
|