Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 5 |
|
| 6 |
def respond(message, history):
|
| 7 |
-
messages = [{"role": "system", "content": "You are a
|
| 8 |
|
| 9 |
if history:
|
| 10 |
messages.extend(history)
|
|
@@ -14,7 +14,7 @@ def respond(message, history):
|
|
| 14 |
response = client.chat_completion (
|
| 15 |
messages,
|
| 16 |
max_tokens=100,
|
| 17 |
-
temperature
|
| 18 |
)
|
| 19 |
|
| 20 |
return response['choices'][0]['message']['content'].strip()
|
|
|
|
| 4 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 5 |
|
| 6 |
def respond(message, history):
|
| 7 |
+
messages = [{"role": "system", "content": "You are a friendly chatbot"}]
|
| 8 |
|
| 9 |
if history:
|
| 10 |
messages.extend(history)
|
|
|
|
| 14 |
response = client.chat_completion (
|
| 15 |
messages,
|
| 16 |
max_tokens=100,
|
| 17 |
+
temperature=0.2
|
| 18 |
)
|
| 19 |
|
| 20 |
return response['choices'][0]['message']['content'].strip()
|