xianbao HF staff commited on
Commit
ad46b55
1 Parent(s): 72583bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -142,7 +142,7 @@ def _launch_demo(args, model, processor):
142
 
143
  text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
144
  image_inputs, video_inputs = process_vision_info(messages)
145
- inputs = processor(text=[text], images=image_inputs, videos=video_inputs, padding=True, return_tensors='pt').to("cuda")
146
 
147
  tokenizer = processor.tokenizer
148
  streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=True, skip_special_tokens=True)
 
142
 
143
  text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
144
  image_inputs, video_inputs = process_vision_info(messages)
145
+ inputs = processor(text=[text], images=image_inputs, videos=video_inputs, padding=True, return_tensors='pt').to(model.device)
146
 
147
  tokenizer = processor.tokenizer
148
  streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=True, skip_special_tokens=True)