Spaces:
Runtime error
Runtime error
taka-yamakoshi
commited on
Commit
·
6da8b4f
1
Parent(s):
228552f
remove nested cols
Browse files
app.py
CHANGED
|
@@ -58,11 +58,12 @@ if __name__=='__main__':
|
|
| 58 |
decoded_sent = [tokenizer.decode([token]) for token in input_sent[1:-1]]
|
| 59 |
num_tokens[f'sent_{sent_id}'] = len(decoded_sent)
|
| 60 |
|
| 61 |
-
char_nums = [len(word)+2 for word in decoded_sent]
|
| 62 |
-
word_cols = st.columns(char_nums)
|
| 63 |
-
for word_col,word in zip(word_cols,decoded_sent):
|
| 64 |
-
with word_col:
|
| 65 |
-
st.write(word)
|
|
|
|
| 66 |
st.write(f'{len(decoded_sent)} tokens')
|
| 67 |
|
| 68 |
if len(sents['sent_1'])>0 and len(sents['sent_2'])>0:
|
|
|
|
| 58 |
decoded_sent = [tokenizer.decode([token]) for token in input_sent[1:-1]]
|
| 59 |
num_tokens[f'sent_{sent_id}'] = len(decoded_sent)
|
| 60 |
|
| 61 |
+
#char_nums = [len(word)+2 for word in decoded_sent]
|
| 62 |
+
#word_cols = st.columns(char_nums)
|
| 63 |
+
#for word_col,word in zip(word_cols,decoded_sent):
|
| 64 |
+
#with word_col:
|
| 65 |
+
#st.write(word)
|
| 66 |
+
st.write(' '.join(decoded_sent))
|
| 67 |
st.write(f'{len(decoded_sent)} tokens')
|
| 68 |
|
| 69 |
if len(sents['sent_1'])>0 and len(sents['sent_2'])>0:
|