ikuner commited on
Commit
6ce5498
1 Parent(s): e19294a

Create app

Browse files
Files changed (1) hide show
  1. app +16 -0
app ADDED
@@ -0,0 +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()