Spaces:
Running
on
Zero
Running
on
Zero
slslslrhfem
commited on
Commit
·
035eb8a
1
Parent(s):
be8ccdd
add hf token
Browse files
app.py
CHANGED
|
@@ -6,7 +6,9 @@ import numpy as np
|
|
| 6 |
from inference import inference
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
from pathlib import Path
|
|
|
|
| 9 |
|
|
|
|
| 10 |
def download_models_from_hub():
|
| 11 |
"""
|
| 12 |
Download model checkpoints from Hugging Face Model Hub
|
|
@@ -30,7 +32,8 @@ def download_models_from_hub():
|
|
| 30 |
repo_id="mippia/FST-checkpoints",
|
| 31 |
filename=filename,
|
| 32 |
local_dir=str(model_dir),
|
| 33 |
-
local_dir_use_symlinks=False
|
|
|
|
| 34 |
)
|
| 35 |
print(f"✅ {model_name} model downloaded successfully!")
|
| 36 |
downloaded_models[model_name] = str(local_path)
|
|
|
|
| 6 |
from inference import inference
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
from pathlib import Path
|
| 9 |
+
import os
|
| 10 |
|
| 11 |
+
token = os.getenv("HF_TOKEN")
|
| 12 |
def download_models_from_hub():
|
| 13 |
"""
|
| 14 |
Download model checkpoints from Hugging Face Model Hub
|
|
|
|
| 32 |
repo_id="mippia/FST-checkpoints",
|
| 33 |
filename=filename,
|
| 34 |
local_dir=str(model_dir),
|
| 35 |
+
local_dir_use_symlinks=False,
|
| 36 |
+
token=token
|
| 37 |
)
|
| 38 |
print(f"✅ {model_name} model downloaded successfully!")
|
| 39 |
downloaded_models[model_name] = str(local_path)
|