Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,15 @@ from huggingface_hub import InferenceClient
|
|
| 3 |
import gradio as gr
|
| 4 |
import random
|
| 5 |
|
| 6 |
-
client = InferenceClient("
|
| 7 |
|
| 8 |
def respond(message, history):
|
| 9 |
messages = [{"role":"system", "content":"You are a friendly chatbot! :)"}]
|
| 10 |
|
| 11 |
if history:
|
| 12 |
messages.extend(history)
|
|
|
|
|
|
|
| 13 |
|
| 14 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3) #temp & top_p control random
|
| 15 |
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import random
|
| 5 |
|
| 6 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 7 |
|
| 8 |
def respond(message, history):
|
| 9 |
messages = [{"role":"system", "content":"You are a friendly chatbot! :)"}]
|
| 10 |
|
| 11 |
if history:
|
| 12 |
messages.extend(history)
|
| 13 |
+
|
| 14 |
+
messages.append({"role":"user", "content":message})
|
| 15 |
|
| 16 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3) #temp & top_p control random
|
| 17 |
|