qnguyen3 commited on
Commit
c281bd9
1 Parent(s): 686f035

Update app.py

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