yasserrmd commited on
Commit
226b6dc
1 Parent(s): 231467f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=150)
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