Spaces:
Runtime error
Runtime error
Commit
·
eb844ee
1
Parent(s):
72a0576
Update app.py
Browse files
app.py
CHANGED
@@ -93,7 +93,7 @@ def predict(comment=None) -> dict:
|
|
93 |
|
94 |
model = ToxicModel()
|
95 |
|
96 |
-
model.load_state_dict(torch.load("
|
97 |
model.to(device)
|
98 |
|
99 |
predicted = inference_fn(model, ids, mask, token_type_ids)
|
|
|
93 |
|
94 |
model = ToxicModel()
|
95 |
|
96 |
+
model.load_state_dict(torch.load("toxicx_model_0.pth", map_location=torch.device(device)))
|
97 |
model.to(device)
|
98 |
|
99 |
predicted = inference_fn(model, ids, mask, token_type_ids)
|