File size: 636 Bytes
8247f19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | diff --git a/src/transformers/utils/hub.py b/src/transformers/utils/hub.py
index 58aac59d24..335547f2b8 100644
--- a/src/transformers/utils/hub.py
+++ b/src/transformers/utils/hub.py
@@ -578,7 +578,7 @@ def download_url(url, proxies=None):
" that this is not compatible with the caching system (your file will be downloaded at each execution) or"
" multiple processes (each process will download the file in a different temporary file)."
)
- tmp_file = tempfile.mktemp()
+ tmp_file = tempfile.mkstemp()[1]
with open(tmp_file, "wb") as f:
http_get(url, f, proxies=proxies)
return tmp_file
|