Spaces:
Sleeping
Sleeping
run
Browse files
app.py
CHANGED
|
@@ -23,13 +23,13 @@ If the user gets too personal, remind them that YOU ARE NOT A PROFESSIONAL; THEY
|
|
| 23 |
top_p= 0.9,
|
| 24 |
stream=True
|
| 25 |
)
|
| 26 |
-
|
| 27 |
for message in stream:
|
| 28 |
token=message.choices[0].delta.content
|
| 29 |
-
if
|
| 30 |
-
|
| 31 |
yield response
|
| 32 |
-
|
| 33 |
|
| 34 |
#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"])
|
| 35 |
chatbot= gr.ChatInterface(respond, title="Mean Bot")
|
|
|
|
| 23 |
top_p= 0.9,
|
| 24 |
stream=True
|
| 25 |
)
|
| 26 |
+
responses= ""
|
| 27 |
for message in stream:
|
| 28 |
token=message.choices[0].delta.content
|
| 29 |
+
if responses:
|
| 30 |
+
responses+=token
|
| 31 |
yield response
|
| 32 |
+
#return respond.choices[0].message.content.strip()
|
| 33 |
|
| 34 |
#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"])
|
| 35 |
chatbot= gr.ChatInterface(respond, title="Mean Bot")
|