Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import gradio as gr
|
|
| 2 |
import random as r
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
-
client = InferenceClient("
|
| 6 |
|
| 7 |
def respond(message, history):
|
| 8 |
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
|
@@ -13,8 +13,6 @@ def respond(message, history):
|
|
| 13 |
response = client.chat_completion(
|
| 14 |
messages,
|
| 15 |
max_tokens=100,
|
| 16 |
-
temperature=2,
|
| 17 |
-
top_p=1
|
| 18 |
)
|
| 19 |
|
| 20 |
return response['choices'][0]['message']['content'].strip()
|
|
|
|
| 2 |
import random as r
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
+
client = InferenceClient("google/gemma-2-2b-it")
|
| 6 |
|
| 7 |
def respond(message, history):
|
| 8 |
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
|
|
|
| 13 |
response = client.chat_completion(
|
| 14 |
messages,
|
| 15 |
max_tokens=100,
|
|
|
|
|
|
|
| 16 |
)
|
| 17 |
|
| 18 |
return response['choices'][0]['message']['content'].strip()
|