Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -87,4 +87,39 @@ if __name__ == '__main__':
|
|
87 |
"## <center> The input audio should be clean and pure voice without background music.\n"
|
88 |
"[](https://github.com/svc-develop-team/so-vits-svc)"
|
89 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
app.queue(concurrency_count=1, api_open=args.api).launch(share=args.share)
|
|
|
87 |
"## <center> The input audio should be clean and pure voice without background music.\n"
|
88 |
"[](https://github.com/svc-develop-team/so-vits-svc)"
|
89 |
)
|
90 |
+
|
91 |
+
with gr.Tabs():
|
92 |
+
for (name, cover, vc_fn) in models:
|
93 |
+
with gr.TabItem(name):
|
94 |
+
with gr.Row():
|
95 |
+
gr.Markdown(
|
96 |
+
'<div align="center">'
|
97 |
+
f'<img style="width:auto;height:300px;" src="file/{cover}">' if cover else ""
|
98 |
+
'</div>'
|
99 |
+
)
|
100 |
+
with gr.Row():
|
101 |
+
with gr.Column():
|
102 |
+
vc_input = gr.Audio(label="Input audio"+' (less than 20 seconds)' if limitation else '')
|
103 |
+
vc_transform = gr.Number(label="vc_transform", value=0)
|
104 |
+
auto_f0 = gr.Checkbox(label="auto_f0", value=False)
|
105 |
+
tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)
|
106 |
+
tts_text = gr.Textbox(visible=False, label="TTS text (100 words limitation)" if limitation else "TTS text")
|
107 |
+
tts_voice = gr.Dropdown(choices=voices, visible=False)
|
108 |
+
vc_submit = gr.Button("Generate", variant="primary")
|
109 |
+
with gr.Column():
|
110 |
+
vc_output1 = gr.Textbox(label="Output Message")
|
111 |
+
vc_output2 = gr.Audio(label="Output Audio")
|
112 |
+
vc_submit.click(vc_fn, [vc_input, vc_transform, auto_f0, tts_text, tts_voice, tts_mode], [vc_output1, vc_output2])
|
113 |
+
for category, link in others.items():
|
114 |
+
with gr.TabItem(category):
|
115 |
+
gr.Markdown(
|
116 |
+
f'''
|
117 |
+
<center>
|
118 |
+
<h2>Click to Go</h2>
|
119 |
+
<a href="{link}">
|
120 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-xl-dark.svg"
|
121 |
+
</a>
|
122 |
+
</center>
|
123 |
+
'''
|
124 |
+
)
|
125 |
app.queue(concurrency_count=1, api_open=args.api).launch(share=args.share)
|