Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
-
client = InferenceClient("
|
| 8 |
def respond (message, history):
|
| 9 |
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
| 10 |
if history:
|
|
@@ -12,7 +12,10 @@ def respond (message, history):
|
|
| 12 |
messages.append({"role": "user", "content": message})
|
| 13 |
response = client.chat_completion(
|
| 14 |
messages,
|
| 15 |
-
max_tokens=
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
)
|
| 18 |
print(response['choices'][0]['message']['content'].strip())
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
+
client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
| 8 |
def respond (message, history):
|
| 9 |
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
| 10 |
if history:
|
|
|
|
| 12 |
messages.append({"role": "user", "content": message})
|
| 13 |
response = client.chat_completion(
|
| 14 |
messages,
|
| 15 |
+
max_tokens=10,
|
| 16 |
+
temperature =.9,
|
| 17 |
+
top_p=.7
|
| 18 |
+
|
| 19 |
|
| 20 |
)
|
| 21 |
print(response['choices'][0]['message']['content'].strip())
|