Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
4 |
import gradio as gr
|
5 |
import random
|
6 |
|
7 |
-
client=InferenceClient("
|
8 |
|
9 |
|
10 |
def respond(message, history):
|
@@ -17,7 +17,8 @@ def respond(message, history):
|
|
17 |
if history:
|
18 |
messages.extend(history)
|
19 |
|
20 |
-
response = client.chat_completion(messages, max_tokens=100)
|
|
|
21 |
|
22 |
return response['choices'][0]['message']['content'].strip()
|
23 |
|
|
|
4 |
import gradio as gr
|
5 |
import random
|
6 |
|
7 |
+
client=InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
8 |
|
9 |
|
10 |
def respond(message, history):
|
|
|
17 |
if history:
|
18 |
messages.extend(history)
|
19 |
|
20 |
+
response = client.chat_completion(messages, max_tokens=100, temperature=2, top_p=1)
|
21 |
+
#temperature and top_p control randomness
|
22 |
|
23 |
return response['choices'][0]['message']['content'].strip()
|
24 |
|