Update client.py
Browse files
client.py
CHANGED
@@ -6,8 +6,8 @@ from database import execute
|
|
6 |
|
7 |
# Load the model and tokenizer
|
8 |
model_name = "Qwen/Qwen2.5-3B-Instruct"
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name
|
10 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16
|
11 |
|
12 |
def respond(message, history, system_message, max_tokens, temperature, top_p):
|
13 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|
|
|
6 |
|
7 |
# Load the model and tokenizer
|
8 |
model_name = "Qwen/Qwen2.5-3B-Instruct"
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
10 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
|
11 |
|
12 |
def respond(message, history, system_message, max_tokens, temperature, top_p):
|
13 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|