Spaces:
Running
Running
taka-yamakoshi
commited on
Commit
·
e9daec4
1
Parent(s):
f70863b
adjust index
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ if __name__=='__main__':
|
|
55 |
sents[f'sent_{sent_id+1}'] = sentence
|
56 |
if len(sentence)>0:
|
57 |
input_sent = tokenizer(sentence)['input_ids']
|
58 |
-
encoded_sent = [str(token) for token in input_sent]
|
59 |
decoded_sent = [tokenizer.decode([token]) for token in input_sent[1:-1]]
|
60 |
num_tokens[f'sent_{sent_id+1}'] = len(decoded_sent)
|
61 |
|
|
|
55 |
sents[f'sent_{sent_id+1}'] = sentence
|
56 |
if len(sentence)>0:
|
57 |
input_sent = tokenizer(sentence)['input_ids']
|
58 |
+
encoded_sent = [str(token) for token in input_sent[1:-1]]
|
59 |
decoded_sent = [tokenizer.decode([token]) for token in input_sent[1:-1]]
|
60 |
num_tokens[f'sent_{sent_id+1}'] = len(decoded_sent)
|
61 |
|