b1swas commited on
Commit
7f3fb64
·
verified ·
1 Parent(s): 1e55c78

adjusted tensor shape

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ if __name__ == "__main__":
66
  if model.config.is_encoder_decoder:
67
  highlighted_out = []
68
  else:
69
- input_tokens = tokenizer.convert_ids_to_tokens(inputs.input_ids)
70
  highlighted_out = [(token.replace("▁", " "), None) for token in input_tokens]
71
  # Get the (decoded_token, label) pairs for the generated tokens
72
  for token, proba in zip(generated_tokens, transition_proba[0]):
 
66
  if model.config.is_encoder_decoder:
67
  highlighted_out = []
68
  else:
69
+ input_tokens = tokenizer.convert_ids_to_tokens(inputs.input_ids[0])
70
  highlighted_out = [(token.replace("▁", " "), None) for token in input_tokens]
71
  # Get the (decoded_token, label) pairs for the generated tokens
72
  for token, proba in zip(generated_tokens, transition_proba[0]):