Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,13 +128,13 @@ def respond(message, history):
|
|
| 128 |
|
| 129 |
messages.append({'role':'user', 'content': message})
|
| 130 |
|
| 131 |
-
response = client.chat_completion(messages, max_tokens=
|
| 132 |
# Temp and top_p control randomness
|
| 133 |
|
| 134 |
return response['choices'][0]['message']['content'].strip()
|
| 135 |
|
| 136 |
with gr.Blocks(theme='earneleh/paris') as chatbot:
|
| 137 |
-
with gr.Row(scale=
|
| 138 |
gr.Image("ai.png")
|
| 139 |
with gr.Row(scale=0.5):
|
| 140 |
gr.ChatInterface(respond, type= 'messages')
|
|
|
|
| 128 |
|
| 129 |
messages.append({'role':'user', 'content': message})
|
| 130 |
|
| 131 |
+
response = client.chat_completion(messages, max_tokens=250, temperature=1.7, top_p=.7)
|
| 132 |
# Temp and top_p control randomness
|
| 133 |
|
| 134 |
return response['choices'][0]['message']['content'].strip()
|
| 135 |
|
| 136 |
with gr.Blocks(theme='earneleh/paris') as chatbot:
|
| 137 |
+
with gr.Row(scale=0.5):
|
| 138 |
gr.Image("ai.png")
|
| 139 |
with gr.Row(scale=0.5):
|
| 140 |
gr.ChatInterface(respond, type= 'messages')
|