KingNish commited on
Commit
c8371cb
1 Parent(s): 7bbaee5

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +1 -1
chatbot.py CHANGED
@@ -279,7 +279,7 @@ def model_inference(
279
 
280
  inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
281
  streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
282
- generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=2048)
283
  generated_text = ""
284
 
285
  thread = Thread(target=model.generate, kwargs=generation_kwargs)
 
279
 
280
  inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
281
  streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
282
+ generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=2048, do_sample=True, top_p=0.8, temprature=0.7)
283
  generated_text = ""
284
 
285
  thread = Thread(target=model.generate, kwargs=generation_kwargs)