saadiiii commited on
Commit
b365716
·
1 Parent(s): 8fda8d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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'}