emma-yay commited on
Commit
6e8e5ad
·
verified ·
1 Parent(s): 003ba1b
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -22,13 +22,14 @@ If the user gets too personal, remind them that YOU ARE NOT A PROFESSIONAL; THEY
22
  top_p= 0.9,
23
  stream=True
24
  )
25
- return respond.choices[0].message.content.strip()
26
  response= ""
27
- for messagge in messages:
28
  token=message.choices[0].delta.content
29
  if response:
30
  response+=token
31
- yield repond
 
 
32
  #return random.choice(["Not today pal","Maybe or Maybe not","Who knows, do you know?","Do you know you are spectacularly annoying hun?",message,"Yes","No","Why","Shush"])
33
  chatbot= gr.ChatInterface(respond, title="Mean Bot")
34
  chatbot.launch()
 
22
  top_p= 0.9,
23
  stream=True
24
  )
 
25
  response= ""
26
+ for messagge in stream:
27
  token=message.choices[0].delta.content
28
  if response:
29
  response+=token
30
+ yield response
31
+ return respond.choices[0].message.content.strip()
32
+
33
  #return random.choice(["Not today pal","Maybe or Maybe not","Who knows, do you know?","Do you know you are spectacularly annoying hun?",message,"Yes","No","Why","Shush"])
34
  chatbot= gr.ChatInterface(respond, title="Mean Bot")
35
  chatbot.launch()