KvrParaskevi commited on
Commit
ac410da
·
verified ·
1 Parent(s): 5ada6dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def chatbot(message, history):
17
  # Create a Langchain chat prompt template
18
  chat_prompt_template = ChatPromptTemplate.from_messages([prompt_template])
19
  # Use the Langchain TextIteratorStreamer to generate responses
20
- streamer = TextStreamer(model, tokenizer, chat_prompt_template)
21
  response = model.generate(chat_prompt_template, streamer=streamer, max_new_tokens=20)
22
  return response
23
 
 
17
  # Create a Langchain chat prompt template
18
  chat_prompt_template = ChatPromptTemplate.from_messages([prompt_template])
19
  # Use the Langchain TextIteratorStreamer to generate responses
20
+ streamer = TextStreamer(model, tokenizer)
21
  response = model.generate(chat_prompt_template, streamer=streamer, max_new_tokens=20)
22
  return response
23