Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
|
@@ -2,7 +2,6 @@ import gc
|
|
| 2 |
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
| 5 |
-
from tqdm.notebook import tqdm, trange
|
| 6 |
|
| 7 |
import torch
|
| 8 |
from torch import nn
|
|
@@ -283,7 +282,7 @@ def predict_location_preds(tokenizer, model, feature_text, pn_history, pn_histor
|
|
| 283 |
preds = []
|
| 284 |
|
| 285 |
with torch.no_grad():
|
| 286 |
-
for batch in
|
| 287 |
|
| 288 |
for k, v in batch.items():
|
| 289 |
if k not in ['offset_mapping', 'sequence_id']:
|
|
|
|
| 2 |
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
|
|
|
| 5 |
|
| 6 |
import torch
|
| 7 |
from torch import nn
|
|
|
|
| 282 |
preds = []
|
| 283 |
|
| 284 |
with torch.no_grad():
|
| 285 |
+
for batch in test_dl:
|
| 286 |
|
| 287 |
for k, v in batch.items():
|
| 288 |
if k not in ['offset_mapping', 'sequence_id']:
|