Spaces:
Sleeping
Sleeping
Vladimir Alabov
commited on
Commit
·
4ce7965
1
Parent(s):
323e576
Refactor #6
Browse files
app.py
CHANGED
@@ -3,8 +3,6 @@ import io
|
|
3 |
import gradio as gr
|
4 |
import librosa
|
5 |
import numpy as np
|
6 |
-
import so_vits_svc_fork.utils
|
7 |
-
from so_vits_svc_fork.inference.infer_tool import Svc
|
8 |
import logging
|
9 |
import soundfile
|
10 |
import asyncio
|
@@ -54,14 +52,13 @@ if __name__ == '__main__':
|
|
54 |
parser.add_argument('--api', action="store_true", default=False)
|
55 |
parser.add_argument("--share", action="store_true", default=False, help="share gradio app")
|
56 |
args = parser.parse_args()
|
57 |
-
#hubert_model = utils.get_hubert_model().to(args.device)
|
58 |
models = []
|
59 |
voices = []
|
60 |
for f in os.listdir("models"):
|
61 |
name = f
|
62 |
-
|
63 |
-
cover = f"models/{f}/cover.png" if os.path.exists(f"models/{f}/cover.png") else None
|
64 |
-
models.append((name, cover, create_vc_fn(model, name)))
|
65 |
|
66 |
# !svc infer {NAME}.wav -c config.json -m G_riri_220.pth
|
67 |
# display(Audio(f"{NAME}.out.wav", autoplay=True))
|
|
|
3 |
import gradio as gr
|
4 |
import librosa
|
5 |
import numpy as np
|
|
|
|
|
6 |
import logging
|
7 |
import soundfile
|
8 |
import asyncio
|
|
|
52 |
parser.add_argument('--api', action="store_true", default=False)
|
53 |
parser.add_argument("--share", action="store_true", default=False, help="share gradio app")
|
54 |
args = parser.parse_args()
|
|
|
55 |
models = []
|
56 |
voices = []
|
57 |
for f in os.listdir("models"):
|
58 |
name = f
|
59 |
+
# = Svc(fr"models/{f}/{f}.pth", f"models/{f}/config.json", device=args.device)
|
60 |
+
#cover = f"models/{f}/cover.png" if os.path.exists(f"models/{f}/cover.png") else None
|
61 |
+
#models.append((name, cover, create_vc_fn(model, name)))
|
62 |
|
63 |
# !svc infer {NAME}.wav -c config.json -m G_riri_220.pth
|
64 |
# display(Audio(f"{NAME}.out.wav", autoplay=True))
|