Narsil HF staff commited on
Commit
2f5a58e
1 Parent(s): 036cfd1
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from huggingface_hub import hf_hub_download
7
 
8
  def download_slow(repo_id):
9
  os.environ.pop("HF_TRANSFER", None)
10
- with tempfile.NamedDirectory() as workdir:
11
  hf_hub_download(
12
  repo_id,
13
  filename="pytorch_model.bin",
@@ -18,7 +18,7 @@ def download_slow(repo_id):
18
 
19
  def download_fast(repo_id):
20
  os.environ["HF_TRANSFER"] = "1"
21
- with tempfile.NamedDirectory() as workdir:
22
  hf_hub_download(
23
  repo_id,
24
  filename="pytorch_model.bin",
 
7
 
8
  def download_slow(repo_id):
9
  os.environ.pop("HF_TRANSFER", None)
10
+ with tempfile.TemporaryDirectory() as workdir:
11
  hf_hub_download(
12
  repo_id,
13
  filename="pytorch_model.bin",
 
18
 
19
  def download_fast(repo_id):
20
  os.environ["HF_TRANSFER"] = "1"
21
+ with tempfile.TemporaryDirectory() as workdir:
22
  hf_hub_download(
23
  repo_id,
24
  filename="pytorch_model.bin",