wasmdashai commited on
Commit
3bcf5c9
·
verified ·
1 Parent(s): 45b6f82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -252,10 +252,13 @@ def dash(text,session_ai,is_state=True):
252
  response,session_ai=get_answer_ai(text,session_ai)
253
  txt=' '
254
  for chunk in response:
255
- if is_state:
256
- txt+=chunk.text
257
- else:
258
- txt=chunk.text
 
 
 
259
 
260
 
261
  yield txt,session_ai
 
252
  response,session_ai=get_answer_ai(text,session_ai)
253
  txt=' '
254
  for chunk in response:
255
+ if chunk is not None:
256
+ try:
257
+ if is_state:
258
+ txt+=chunk.text
259
+ else:
260
+ txt=chunk.text
261
+ except:pass
262
 
263
 
264
  yield txt,session_ai