KingNish commited on
Commit
09422ec
1 Parent(s): afff019

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +1 -1
chatbot.py CHANGED
@@ -266,7 +266,7 @@ def model_inference( user_prompt, chat_history, web_search):
266
 
267
  inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
268
  streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
269
- generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024, do_sample=True)
270
  generated_text = ""
271
 
272
  thread = Thread(target=model.generate, kwargs=generation_kwargs)
 
266
 
267
  inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
268
  streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
269
+ generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=1024)
270
  generated_text = ""
271
 
272
  thread = Thread(target=model.generate, kwargs=generation_kwargs)