bacngv commited on
Commit
927da69
·
verified ·
1 Parent(s): 247c10c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(input_ids=input_ids, attention_mask=attention_mask, 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()
 
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()