commonlemon commited on
Commit
c4ccf4e
·
verified ·
1 Parent(s): 6c8811e

added none chk

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -24,8 +24,10 @@ def respond(message, history):
24
  ):
25
 
26
  token = message.choices[0].delta.content
27
- response += token
28
- yield response
 
 
29
 
30
  # defining chatbot
31
  chatbot = gr.ChatInterface(respond, title = "", description = "")
 
24
  ):
25
 
26
  token = message.choices[0].delta.content
27
+
28
+ if token is not None:
29
+ response += token
30
+ yield response
31
 
32
  # defining chatbot
33
  chatbot = gr.ChatInterface(respond, title = "", description = "")