14-26AA commited on
Commit
5ee7d48
1 Parent(s): b9eb840

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -4
app.py CHANGED
@@ -1,7 +1,27 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from inference import infer
3
 
 
 
4
 
5
+
6
+
7
+
8
+ def vc_fn(sid,random1, input_audio,vc_transform):
9
+
10
+ return "Success", (22050, audio)
11
+
12
+
13
+ app = gr.Blocks()
14
+ with app:
15
+ with gr.Tabs():
16
+ with gr.TabItem("Basic"):
17
+ gr.Markdown(value="""
18
+ """)
19
+ sid = gr.Dropdown(label="音色",choices=['speaker0'], value="speaker0")
20
+ vc_input3 = gr.Audio(label="上传音频,建议小于2分钟")
21
+ vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)",value=0)
22
+ vc_submit = gr.Button("转换", variant="primary")
23
+ vc_output1 = gr.Textbox(label="Output Message")
24
+ vc_output2 = gr.Audio(label="Output Audio")
25
+ vc_submit.click(vc_fn, [sid,random1, vc_input3, vc_transform], [vc_output1, vc_output2])
26
+
27
+ app.launch()