Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -245,38 +245,6 @@ def voice_conversion(ta, ra, da):
|
|
245 |
|
246 |
return "enhanced.wav"
|
247 |
|
248 |
-
c1=gr.Interface(
|
249 |
-
fn=voice_conversion,
|
250 |
-
inputs=[
|
251 |
-
gr.Textbox(lines=1, label = "请填写您的OpenAI-API-key"),
|
252 |
-
gr.Audio(source="upload", label = "请上传您喜欢的声音(wav文件)"),
|
253 |
-
gr.Audio(source="microphone", label = "和您的专属AI聊天吧!", type="filepath"),
|
254 |
-
# gr.Radio(["TOEFL", "Therapist", "Alice"], label="TOEFL Examiner, Therapist Tina, or Assistant Alice?"),
|
255 |
-
],
|
256 |
-
outputs=[
|
257 |
-
gr.Textbox(label="Speech to Text"), gr.Textbox(label="ChatGPT Output"), gr.Audio(label="Audio with Custom Voice"),
|
258 |
-
],
|
259 |
-
#theme="huggingface",
|
260 |
-
description = "🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
|
261 |
-
)
|
262 |
-
|
263 |
-
c2=gr.Interface(
|
264 |
-
fn=voice_conversion,
|
265 |
-
inputs=[
|
266 |
-
gr.Textbox(lines=1, label = "请填写您的OpenAI-API-key"),
|
267 |
-
gr.Audio(source="microphone", label = "请上传您喜欢的声音,并尽量避免噪音"),
|
268 |
-
gr.Audio(source="microphone", label = "和您的专属AI聊天吧!", type="filepath"),
|
269 |
-
gr.Radio(["TOEFL", "Therapist", "Alice"], label="TOEFL Examiner, Therapist Tina, or Assistant Alice?"),
|
270 |
-
],
|
271 |
-
outputs=[
|
272 |
-
gr.Textbox(label="Speech to Text"), gr.Textbox(label="ChatGPT Output"), gr.Audio(label="Audio with Custom Voice"),
|
273 |
-
],
|
274 |
-
#theme="huggingface",
|
275 |
-
description = "🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
|
276 |
-
)
|
277 |
-
|
278 |
-
demo = gr.TabbedInterface([c1, c2], ["wav文件上传", "麦克风上传"], title = '🥳💬💕 - TalktoAI,随时随地,谈天说地!')
|
279 |
-
demo.launch(show_error = True)
|
280 |
block = gr.Blocks()
|
281 |
|
282 |
with block:
|
|
|
245 |
|
246 |
return "enhanced.wav"
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
block = gr.Blocks()
|
249 |
|
250 |
with block:
|