Kamilake commited on
Commit
2800fe4
·
unverified ·
1 Parent(s): 51936e8

models : change default encoding to utf8 (#605)

Browse files
Files changed (1) hide show
  1. models/convert-h5-to-ggml.py +3 -3
models/convert-h5-to-ggml.py CHANGED
@@ -79,11 +79,11 @@ dir_model = sys.argv[1]
79
  dir_whisper = sys.argv[2]
80
  dir_out = sys.argv[3]
81
 
82
- with open(dir_model + "/vocab.json", "r") as f:
83
  encoder = json.load(f)
84
- with open(dir_model + "/added_tokens.json", "r") as f:
85
  encoder_added = json.load(f)
86
- with open(dir_model + "/config.json", "r") as f:
87
  hparams = json.load(f)
88
 
89
  model = WhisperForConditionalGeneration.from_pretrained(dir_model)
 
79
  dir_whisper = sys.argv[2]
80
  dir_out = sys.argv[3]
81
 
82
+ with open(dir_model + "/vocab.json", "r", encoding="utf8") as f:
83
  encoder = json.load(f)
84
+ with open(dir_model + "/added_tokens.json", "r", encoding="utf8") as f:
85
  encoder_added = json.load(f)
86
+ with open(dir_model + "/config.json", "r", encoding="utf8") as f:
87
  hparams = json.load(f)
88
 
89
  model = WhisperForConditionalGeneration.from_pretrained(dir_model)