Spaces:
Sleeping
Sleeping
wasmdashai
commited on
Commit
•
a1b85a3
1
Parent(s):
757d35f
Update app.py
Browse files
app.py
CHANGED
@@ -172,11 +172,13 @@ def generate_audio(text,speaker_id=None):
|
|
172 |
|
173 |
|
174 |
def get_answer_ai(text,session_ai):
|
175 |
-
|
|
|
|
|
176 |
try:
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
|
181 |
|
182 |
except :
|
|
|
172 |
|
173 |
|
174 |
def get_answer_ai(text,session_ai):
|
175 |
+
if session_ai is None:
|
176 |
+
session_ai=create_chat_session()
|
177 |
+
|
178 |
try:
|
179 |
+
|
180 |
+
response = session_ai.send_message(text,stream=True)
|
181 |
+
return response,session_ai
|
182 |
|
183 |
|
184 |
except :
|