Set UTF-8 encoding on vocab.json

This commit is contained in:
swanserquack 2023-04-12 19:29:53 +01:00
parent fb3e15e8ee
commit ce3eb80f5b

View File

@ -59,7 +59,7 @@ if len(sys.argv) < 3:
dir_model = sys.argv[1] dir_model = sys.argv[1]
fname_out = sys.argv[1] + "/ggml-model.bin" fname_out = sys.argv[1] + "/ggml-model.bin"
with open(dir_model + "/vocab.json", "r") as f: with open(dir_model + "/vocab.json", "r", encoding="utf8") as f:
encoder = json.load(f) encoder = json.load(f)
with open(dir_model + "/added_tokens.json", "r") as f: with open(dir_model + "/added_tokens.json", "r") as f: