Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import gradio as gr
|
|
| 4 |
import random
|
| 5 |
|
| 6 |
|
| 7 |
-
client = InferenceClient("
|
| 8 |
|
| 9 |
|
| 10 |
def respond(message, history):
|
|
@@ -21,7 +21,8 @@ def respond(message, history):
|
|
| 21 |
messages.extend(history)
|
| 22 |
|
| 23 |
response = client.chat_completion(
|
| 24 |
-
messages, max_tokens = 100
|
|
|
|
| 25 |
)
|
| 26 |
return response['choices'][0]['message']['content'].strip()
|
| 27 |
|
|
|
|
| 4 |
import random
|
| 5 |
|
| 6 |
|
| 7 |
+
client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
| 8 |
|
| 9 |
|
| 10 |
def respond(message, history):
|
|
|
|
| 21 |
messages.extend(history)
|
| 22 |
|
| 23 |
response = client.chat_completion(
|
| 24 |
+
messages, max_tokens = 100, temprature=1.3, top_p=.2
|
| 25 |
+
#temp and top_p control randomness
|
| 26 |
)
|
| 27 |
return response['choices'][0]['message']['content'].strip()
|
| 28 |
|