ikuner commited on
Commit
d68b782
·
verified ·
1 Parent(s): 4346cc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -1,16 +1,16 @@
1
  import gradio as gr
2
  import torch
3
 
4
- # 假设模型是一个声音合成模型
5
- def synthesize_speech(text):
6
- model = torch.load("your_model.pth")
7
- model.eval()
8
- # 假设你的模型有一个名为 synthesize 的方法
9
- audio_output = model.synthesize(text)
10
- return audio_output
11
 
12
- gr.Interface(
13
- fn=synthesize_speech,
14
- inputs="text",
15
- outputs="audio"
16
- ).launch()
 
1
  import gradio as gr
2
  import torch
3
 
4
+ # 假设模型是一个声音合成模型
5
+ def synthesize_speech(text):
6
+ model = torch.load("your_model.pth")
7
+ model.eval()
8
+ # 假设你的模型有一个名为 synthesize 的方法
9
+ audio_output = model.synthesize(text)
10
+ return audio_output
11
 
12
+ gr.Interface(
13
+ fn=synthesize_speech,
14
+ inputs="text",
15
+ outputs="audio"
16
+ ).launch()