Spaces:
Build error
Build error
Commit
·
94da4cf
1
Parent(s):
a6b02fb
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ class VitsGradio:
|
|
11 |
for dir in dirs:
|
12 |
self.modelPaths.append(dir)
|
13 |
with gr.Blocks() as self.Vits:
|
14 |
-
with gr.Tab("
|
15 |
with gr.Row(visible=False) as self.VoiceConversion:
|
16 |
with gr.Column():
|
17 |
with gr.Row():
|
@@ -25,10 +25,10 @@ class VitsGradio:
|
|
25 |
with gr.Row():
|
26 |
self.VCOutputs = gr.Audio()
|
27 |
self.btnVC.click(self.so.inference, inputs=[self.srcaudio,self.dsid,self.tran,self.th], outputs=[self.VCOutputs])
|
28 |
-
with gr.Tab("
|
29 |
with gr.Column():
|
30 |
modelstrs = gr.Dropdown(label = "模型", choices = self.modelPaths, value = self.modelPaths[0], type = "value")
|
31 |
-
devicestrs = gr.Dropdown(label = "设备", choices = ["cpu","cuda"], value = "cpu", type = "value")
|
32 |
btnMod = gr.Button("载入模型")
|
33 |
btnMod.click(self.loadModel, inputs=[modelstrs,devicestrs], outputs = [self.dsid,self.VoiceConversion])
|
34 |
|
|
|
11 |
for dir in dirs:
|
12 |
self.modelPaths.append(dir)
|
13 |
with gr.Blocks() as self.Vits:
|
14 |
+
with gr.Tab("转换"):
|
15 |
with gr.Row(visible=False) as self.VoiceConversion:
|
16 |
with gr.Column():
|
17 |
with gr.Row():
|
|
|
25 |
with gr.Row():
|
26 |
self.VCOutputs = gr.Audio()
|
27 |
self.btnVC.click(self.so.inference, inputs=[self.srcaudio,self.dsid,self.tran,self.th], outputs=[self.VCOutputs])
|
28 |
+
with gr.Tab("选择模型"):
|
29 |
with gr.Column():
|
30 |
modelstrs = gr.Dropdown(label = "模型", choices = self.modelPaths, value = self.modelPaths[0], type = "value")
|
31 |
+
devicestrs = gr.Dropdown(label = "设备(只能选择cpu)", choices = ["cpu","cuda"], value = "cpu", type = "value")
|
32 |
btnMod = gr.Button("载入模型")
|
33 |
btnMod.click(self.loadModel, inputs=[modelstrs,devicestrs], outputs = [self.dsid,self.VoiceConversion])
|
34 |
|