wasmdashai commited on
Commit
a1b85a3
1 Parent(s): 757d35f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- if session_ai is not None:
178
- response = session_ai.send_message(text,stream=True)
179
- return response,session_ai
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 :