]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Add enconding parameter to vocab.json opening to fix errors
authorJoonas Pihlajamaa <redacted>
Sun, 23 Oct 2022 08:55:01 +0000 (11:55 +0300)
committerJoonas Pihlajamaa <redacted>
Sun, 23 Oct 2022 08:55:01 +0000 (11:55 +0300)
models/convert-pt-to-ggml.py

index 9e9b2dcebefb92b0e38a600d3c0fee78e6fe8717..04792d7bf2e24cbf2cd01cd1886bee29fc86c9dd 100644 (file)
@@ -234,7 +234,7 @@ dir_tokenizer = tokenizer.name_or_path
 # output in the same directory as the model
 fname_out = dir_out + "/ggml-model.bin"
 
-with open(dir_tokenizer + "/vocab.json", "r") as f:
+with open(dir_tokenizer + "/vocab.json", "r", encoding="utf8") as f:
     tokens = json.load(f)
 
 # use 16-bit or 32-bit floats