Spaces:
Build error
Build error
Commit
·
7127b4a
1
Parent(s):
ee06340
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ MODEL_INFO = [
|
|
30 |
MODEL_NAMES = [info[0] for info in MODEL_INFO]
|
31 |
|
32 |
MAX_TXT_LEN = 400
|
33 |
-
|
34 |
|
35 |
model_files = {}
|
36 |
config_files = {}
|
@@ -69,10 +69,10 @@ for info in MODEL_INFO:
|
|
69 |
print(f"|> Downloading: {model_name}")
|
70 |
|
71 |
# Download model and config files
|
72 |
-
|
73 |
-
model_files[model_name] = hf_hub_download(repo_id=repo_name, filename=model_file)
|
74 |
-
|
75 |
-
config_files[model_name] = hf_hub_download(repo_id=repo_name, filename=config_file)
|
76 |
|
77 |
# Download speakers.pth if it exists
|
78 |
if speaker_file:
|
|
|
30 |
MODEL_NAMES = [info[0] for info in MODEL_INFO]
|
31 |
|
32 |
MAX_TXT_LEN = 400
|
33 |
+
TOKEN = os.getenv('HUGGING_FACE_HUB_TOKEN')
|
34 |
|
35 |
model_files = {}
|
36 |
config_files = {}
|
|
|
69 |
print(f"|> Downloading: {model_name}")
|
70 |
|
71 |
# Download model and config files
|
72 |
+
model_files[model_name] = hf_hub_download(repo_id=repo_name, filename=model_file, use_auth_token=TOKEN)
|
73 |
+
#model_files[model_name] = hf_hub_download(repo_id=repo_name, filename=model_file)
|
74 |
+
config_files[model_name] = hf_hub_download(repo_id=repo_name, filename=config_file, use_auth_token=TOKEN)
|
75 |
+
#config_files[model_name] = hf_hub_download(repo_id=repo_name, filename=config_file)
|
76 |
|
77 |
# Download speakers.pth if it exists
|
78 |
if speaker_file:
|