Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def predict_ner(model, tokenizer, text, label_map, device):
|
|
| 37 |
|
| 38 |
# Predict NER labels
|
| 39 |
with torch.no_grad():
|
| 40 |
-
logits = model(
|
| 41 |
|
| 42 |
# Convert logits to label IDs
|
| 43 |
label_ids = torch.argmax(logits, dim=2).detach().cpu().numpy()
|
|
|
|
| 37 |
|
| 38 |
# Predict NER labels
|
| 39 |
with torch.no_grad():
|
| 40 |
+
logits = model(inputs_ids=input_ids, labels=None, labels_mask=None, valid_mask=None)
|
| 41 |
|
| 42 |
# Convert logits to label IDs
|
| 43 |
label_ids = torch.argmax(logits, dim=2).detach().cpu().numpy()
|