ikuner commited on
Commit
98fb6a2
1 Parent(s): 1ea50ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -1,16 +1,16 @@
 
 
 
 
 
 
 
1
  import gradio as gr
2
- import torch
3
- import utils # 确保导入utils模块
4
 
5
- # 假设模型是一个声音合成模型
6
- def synthesize_speech(text):
7
- model = torch.load("mg_e8_s112.pth", map_location=torch.device('cpu'))
8
- model.eval()
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(share=True)
 
1
+ import subprocess
2
+
3
+ # 运行克隆脚本
4
+ subprocess.run(["python", "clone_repo.py"], check=True)
5
+
6
+ # 继续执行你的应用逻辑
7
+ # 例如,如果你使用的是 Gradio,可以在这里添加 Gradio 代码
8
  import gradio as gr
 
 
9
 
10
+ def greet(name):
11
+ return "Hello " + name + "!"
12
+
13
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
14
 
15
+ if __name__ == "__main__":
16
+ demo.launch()