Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,6 @@ def chat_hf(audio, custom_token, language):
|
|
41 |
gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
|
42 |
|
43 |
# to voice
|
44 |
-
gpt_response = trim(gpt_response)
|
45 |
if language == 'cn' or 'jp':
|
46 |
text = infer.clean_text(gpt_response)
|
47 |
audio = infer.infer(text, net_g_ms, 0, "demo")
|
@@ -81,8 +80,9 @@ def openai_create(prompt):
|
|
81 |
presence_penalty=0.6,
|
82 |
stop=[" Human:", " AI:"]
|
83 |
)
|
84 |
-
|
85 |
-
|
|
|
86 |
|
87 |
|
88 |
with gr.Blocks() as blocks:
|
|
|
41 |
gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
|
42 |
|
43 |
# to voice
|
|
|
44 |
if language == 'cn' or 'jp':
|
45 |
text = infer.clean_text(gpt_response)
|
46 |
audio = infer.infer(text, net_g_ms, 0, "demo")
|
|
|
80 |
presence_penalty=0.6,
|
81 |
stop=[" Human:", " AI:"]
|
82 |
)
|
83 |
+
text_out = response.choices[0].text.strip()
|
84 |
+
print(text_out)
|
85 |
+
return text_out
|
86 |
|
87 |
|
88 |
with gr.Blocks() as blocks:
|