Spaces:
Sleeping
Sleeping
moti
Browse files
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
|
| 28 |
token=message.choices[0].delta.content
|
| 29 |
if response:
|
| 30 |
response+=token
|
| 31 |
-
yield
|
|
|
|
|
|
|
| 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()
|