Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
import json
|
2 |
import os
|
3 |
import subprocess
|
@@ -15,6 +18,22 @@ from so_vits_svc_fork.hparams import HParams
|
|
15 |
from so_vits_svc_fork.inference.core import Svc
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
###################################################################
|
19 |
# REPLACE THESE VALUES TO CHANGE THE MODEL REPO/CKPT NAME/SETTINGS
|
20 |
###################################################################
|
|
|
1 |
+
from transformers import AutoModel, AutoTokenizer
|
2 |
+
|
3 |
+
|
4 |
import json
|
5 |
import os
|
6 |
import subprocess
|
|
|
18 |
from so_vits_svc_fork.inference.core import Svc
|
19 |
|
20 |
|
21 |
+
|
22 |
+
|
23 |
+
# Get the Hugging Face token from the environment variable
|
24 |
+
token = os.getenv('HF_TOKEN')
|
25 |
+
|
26 |
+
# Instantiate the Hugging Face model
|
27 |
+
model_names = ["nijisakai/JayChou","nijisakai/sunyanzi","nijisakai/linyilian","nijisakai/wangjie"] # Replace these with your actual private model names
|
28 |
+
tokenizers = ["nijisakai/JayChou","nijisakai/sunyanzi","nijisakai/linyilian","nijisakai/wangjie"]
|
29 |
+
models = [AutoModel.from_pretrained(model_name, use_auth_token=token) for model_name in model_names]
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
###################################################################
|
38 |
# REPLACE THESE VALUES TO CHANGE THE MODEL REPO/CKPT NAME/SETTINGS
|
39 |
###################################################################
|