Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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(
|
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)
|