Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ if __name__ == "__main__":
|
|
142 |
deberta_tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-large", model_max_length=256)
|
143 |
|
144 |
model = Custom_bert("microsoft/deberta-large")
|
145 |
-
model.load_state_dict(torch.load(deberta_loc))
|
146 |
model.eval().to(device)
|
147 |
|
148 |
|
|
|
142 |
deberta_tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-large", model_max_length=256)
|
143 |
|
144 |
model = Custom_bert("microsoft/deberta-large")
|
145 |
+
model.load_state_dict(torch.load(deberta_loc, map_location=torch.device(device)))
|
146 |
model.eval().to(device)
|
147 |
|
148 |
|