qnguyen3 commited on
Commit
c0b2c45
1 Parent(s): 0872fb5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -103,7 +103,7 @@ def bot_streaming(message, history):
103
  streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
104
 
105
  image_tensor = model.process_images([image], model.config).to(dtype=model.dtype)
106
- generation_kwargs = dict(input_ids=input_ids.to('cuda'), images=image_tensor.to('cuda'), streamer=streamer, max_new_tokens=512, stopping_criteria=[stopping_criteria])
107
  generated_text = ""
108
  thread = Thread(target=model.generate, kwargs=generation_kwargs)
109
  thread.start()
 
103
  streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
104
 
105
  image_tensor = model.process_images([image], model.config).to(dtype=model.dtype)
106
+ generation_kwargs = dict(input_ids=input_ids.to('cuda'), images=image_tensor.to('cuda'), streamer=streamer, max_new_tokens=512, stopping_criteria=[stopping_criteria], temperature=0.2)
107
  generated_text = ""
108
  thread = Thread(target=model.generate, kwargs=generation_kwargs)
109
  thread.start()