trinity-tandon commited on
Commit
f221a14
·
verified ·
1 Parent(s): 83f893c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,10 +21,10 @@ def respond(message, history):
21
  max_tokens = 100,
22
  stream = True,
23
  ):
24
- token = delta.get("choices", [{}])[0].get("delta", {}).get("content", "")
25
  response += token
26
  yield response
27
 
28
  chatbot = gr.ChatInterface(respond, type = "messages")
29
 
30
- chatbot.launch(debug = True)
 
21
  max_tokens = 100,
22
  stream = True,
23
  ):
24
+ token = messages.choices[0].delta.content
25
  response += token
26
  yield response
27
 
28
  chatbot = gr.ChatInterface(respond, type = "messages")
29
 
30
+ chatbot.launch()