Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import random
|
|
| 5 |
|
| 6 |
|
| 7 |
# Making requests to the model to generate responses:
|
| 8 |
-
client = InferenceClient('
|
| 9 |
|
| 10 |
|
| 11 |
def respond(message, history):
|
|
@@ -18,8 +18,9 @@ def respond(message, history):
|
|
| 18 |
if history:
|
| 19 |
messages.extend(history)
|
| 20 |
|
| 21 |
-
response = client.chat_completion(messages, max_tokens=100)
|
| 22 |
-
|
|
|
|
| 23 |
return response['choices'][0]['message']['content'].strip()
|
| 24 |
|
| 25 |
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
# Making requests to the model to generate responses:
|
| 8 |
+
client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
|
| 9 |
|
| 10 |
|
| 11 |
def respond(message, history):
|
|
|
|
| 18 |
if history:
|
| 19 |
messages.extend(history)
|
| 20 |
|
| 21 |
+
response = client.chat_completion(messages, max_tokens=100, temperature=1.7, top_p=.3)
|
| 22 |
+
# Temp and top_p control randomness
|
| 23 |
+
|
| 24 |
return response['choices'][0]['message']['content'].strip()
|
| 25 |
|
| 26 |
|