mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-18 20:27:53 +00:00
models : change default encoding to utf8 (#605)
This commit is contained in:
parent
4aa3bcf8a4
commit
992aa2cd1b
@ -79,11 +79,11 @@ dir_model = sys.argv[1]
|
||||
dir_whisper = sys.argv[2]
|
||||
dir_out = sys.argv[3]
|
||||
|
||||
with open(dir_model + "/vocab.json", "r") as f:
|
||||
with open(dir_model + "/vocab.json", "r", encoding="utf8") as f:
|
||||
encoder = json.load(f)
|
||||
with open(dir_model + "/added_tokens.json", "r") as f:
|
||||
with open(dir_model + "/added_tokens.json", "r", encoding="utf8") as f:
|
||||
encoder_added = json.load(f)
|
||||
with open(dir_model + "/config.json", "r") as f:
|
||||
with open(dir_model + "/config.json", "r", encoding="utf8") as f:
|
||||
hparams = json.load(f)
|
||||
|
||||
model = WhisperForConditionalGeneration.from_pretrained(dir_model)
|
||||
|
Loading…
Reference in New Issue
Block a user