Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
17 |
def chat(input_text, history=[]):
|
18 |
# Tokenize the input and generate response
|
19 |
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
|
20 |
-
outputs = model.generate(**inputs, max_new_tokens=
|
21 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
22 |
|
23 |
# Update the conversation history
|
|
|
17 |
def chat(input_text, history=[]):
|
18 |
# Tokenize the input and generate response
|
19 |
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
|
20 |
+
outputs = model.generate(**inputs, max_new_tokens=1024)
|
21 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
22 |
|
23 |
# Update the conversation history
|