Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,7 +149,7 @@ elif tokenizer == "Open AI GPT-4o Tokenizer":
|
|
| 149 |
encoding = tiktoken.encoding_for_model("gpt-4o")
|
| 150 |
ids = encoding.encode(txt)
|
| 151 |
split_tokens = [
|
| 152 |
-
encoding.decode_single_token_bytes(id).decode("utf-8") for id in ids
|
| 153 |
]
|
| 154 |
st.write(stream_data)
|
| 155 |
if token_id == True:
|
|
|
|
| 149 |
encoding = tiktoken.encoding_for_model("gpt-4o")
|
| 150 |
ids = encoding.encode(txt)
|
| 151 |
split_tokens = [
|
| 152 |
+
encoding.decode_single_token_bytes(id).decode("utf-8", errors='ignore') for id in ids
|
| 153 |
]
|
| 154 |
st.write(stream_data)
|
| 155 |
if token_id == True:
|