nijisakai commited on
Commit
62b365c
1 Parent(s): f3a23e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
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
  ###################################################################