mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
fix file_utils on python 2
This commit is contained in:
parent
bcde2c61cb
commit
fa76520240
@ -227,7 +227,7 @@ def get_from_cache(url, cache_dir=None):
|
||||
meta = {'url': url, 'etag': etag}
|
||||
meta_path = cache_path + '.json'
|
||||
with open(meta_path, 'w', encoding="utf-8") as meta_file:
|
||||
meta_file.write(json.dumps(meta))
|
||||
json.dump(meta, meta_file)
|
||||
|
||||
logger.info("removing temp file %s", temp_file.name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user