PRAli22 commited on
Commit
5a2154a
1 Parent(s): 3b4ee34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,11 +12,11 @@ inv_label_map = {0: 'B-LOC', 1: 'O', 2: 'B-PERS', 3: 'I-PERS', 4: 'B-ORG', 5: 'I
12
 
13
 
14
  def predict_sent(sentences):
15
- input_ids = TOKENIZERr.encode(sentences, return_tensors='pt')
16
 
17
  with torch.no_grad():
18
  test_model.to('cpu')
19
- output = test_modell(input_ids)
20
  label_indices = np.argmax(output[0].to('cpu').numpy(), axis=2)
21
 
22
  tokens = TOKENIZER.convert_ids_to_tokens(input_ids.to('cpu').numpy()[0])
 
12
 
13
 
14
  def predict_sent(sentences):
15
+ input_ids = TOKENIZER.encode(sentences, return_tensors='pt')
16
 
17
  with torch.no_grad():
18
  test_model.to('cpu')
19
+ output = test_model(input_ids)
20
  label_indices = np.argmax(output[0].to('cpu').numpy(), axis=2)
21
 
22
  tokens = TOKENIZER.convert_ids_to_tokens(input_ids.to('cpu').numpy()[0])