Spaces:
Running
Running
Crawford.Zhou
commited on
Commit
•
f54871c
1
Parent(s):
4b5c1de
添加gpt问答接口
Browse files- app.py +3 -3
- requirements.txt +0 -17
app.py
CHANGED
@@ -93,7 +93,7 @@ def get_text(text, language_str, hps):
|
|
93 |
|
94 |
def infer(text, key, sdp_ratio, noise_scale, noise_scale_w, length_scale, sid):
|
95 |
global net_g
|
96 |
-
message = gpt_35_api_stream(text)
|
97 |
bert, phones, tones, lang_ids = get_text(message, "ZH", hps)
|
98 |
with torch.no_grad():
|
99 |
x_tst=phones.to(device).unsqueeze(0)
|
@@ -154,7 +154,7 @@ if __name__ == "__main__":
|
|
154 |
with gr.Row():
|
155 |
with gr.Column():
|
156 |
gr.Markdown(value="""
|
157 |
-
【AI
|
158 |
音声作者:Xz乔希 https://space.bilibili.com/5859321\n
|
159 |
集成作者:碎语碎念 https://space.bilibili.com/4269384\n
|
160 |
声音归属:嘉然今天吃什么 https://space.bilibili.com/672328094\n
|
@@ -165,7 +165,7 @@ if __name__ == "__main__":
|
|
165 |
发布二创作品请标注本项目作者及链接、作品使用Bert-VITS2 AI生成!\n
|
166 |
""")
|
167 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
168 |
-
value="
|
169 |
text = gr.TextArea(label="Key", placeholder="请输入上面提示中获取的gpt key",
|
170 |
value="key")
|
171 |
speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
|
|
93 |
|
94 |
def infer(text, key, sdp_ratio, noise_scale, noise_scale_w, length_scale, sid):
|
95 |
global net_g
|
96 |
+
message = gpt_35_api_stream(key, text)
|
97 |
bert, phones, tones, lang_ids = get_text(message, "ZH", hps)
|
98 |
with torch.no_grad():
|
99 |
x_tst=phones.to(device).unsqueeze(0)
|
|
|
154 |
with gr.Row():
|
155 |
with gr.Column():
|
156 |
gr.Markdown(value="""
|
157 |
+
【AI嘉然①】在线语音对话版(Bert-Vits2 + gpt)\n
|
158 |
音声作者:Xz乔希 https://space.bilibili.com/5859321\n
|
159 |
集成作者:碎语碎念 https://space.bilibili.com/4269384\n
|
160 |
声音归属:嘉然今天吃什么 https://space.bilibili.com/672328094\n
|
|
|
165 |
发布二创作品请标注本项目作者及链接、作品使用Bert-VITS2 AI生成!\n
|
166 |
""")
|
167 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
168 |
+
value="虚拟主播是什么?")
|
169 |
text = gr.TextArea(label="Key", placeholder="请输入上面提示中获取的gpt key",
|
170 |
value="key")
|
171 |
speaker = gr.Dropdown(choices=speakers, value=speakers[0], label='Speaker')
|
requirements.txt
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
librosa==0.9.1
|
2 |
-
matplotlib
|
3 |
-
numpy
|
4 |
-
numba
|
5 |
-
phonemizer
|
6 |
-
scipy
|
7 |
-
tensorboard
|
8 |
-
torch
|
9 |
-
torchvision
|
10 |
-
Unidecode
|
11 |
-
amfm_decompy
|
12 |
-
jieba
|
13 |
-
transformers
|
14 |
-
pypinyin
|
15 |
-
cn2an
|
16 |
-
gradio
|
17 |
-
av
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|