andito HF staff commited on
Commit
f3b9c11
·
verified ·
1 Parent(s): 6609c1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def model_inference(
49
  ]
50
  prompt = processor.apply_chat_template(resulting_messages, add_generation_prompt=True)
51
  inputs = processor(text=prompt, images=[images], return_tensors="pt")
52
- inputs = {k: v.to("cuda") for k, v in inputs.items()}
53
  generation_args = {
54
  "input_ids": inputs.input_ids,
55
  "pixel_values": inputs.pixel_values,
 
49
  ]
50
  prompt = processor.apply_chat_template(resulting_messages, add_generation_prompt=True)
51
  inputs = processor(text=prompt, images=[images], return_tensors="pt")
52
+ inputs = inputs.to('cuda')
53
  generation_args = {
54
  "input_ids": inputs.input_ids,
55
  "pixel_values": inputs.pixel_values,