mponty commited on
Commit
b3d9d60
·
verified ·
1 Parent(s): c5bd373

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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: