Spaces:
Sleeping
Sleeping
Rename app_20.py to app_21.py
Browse files- app_20.py → app_21.py +3 -0
app_20.py → app_21.py
RENAMED
@@ -134,6 +134,9 @@ def extract_arguments(text, tokenizer, model, beam_search=True):
|
|
134 |
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
|
135 |
token_ids = inputs["input_ids"][0]
|
136 |
|
|
|
|
|
|
|
137 |
|
138 |
#st.write("Token Positions, IDs, and Corresponding Tokens:")
|
139 |
#for position, (token_id, token) in enumerate(zip(token_ids, tokens)):
|
|
|
134 |
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
|
135 |
token_ids = inputs["input_ids"][0]
|
136 |
|
137 |
+
for i, (token, word_id) in enumerate(zip(tokens, word_ids)):
|
138 |
+
st.write(f"Token {i}: {token}, Word ID: {word_id}")
|
139 |
+
|
140 |
|
141 |
#st.write("Token Positions, IDs, and Corresponding Tokens:")
|
142 |
#for position, (token_id, token) in enumerate(zip(token_ids, tokens)):
|