Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def model_inference(
|
|
55 |
]
|
56 |
prompt = processor.apply_chat_template(resulting_messages, add_generation_prompt=True)
|
57 |
inputs = processor(text=prompt, images=[images], return_tensors="pt")
|
58 |
-
inputs
|
59 |
generation_args = {
|
60 |
"max_new_tokens": max_new_tokens,
|
61 |
"repetition_penalty": repetition_penalty,
|
|
|
55 |
]
|
56 |
prompt = processor.apply_chat_template(resulting_messages, add_generation_prompt=True)
|
57 |
inputs = processor(text=prompt, images=[images], return_tensors="pt")
|
58 |
+
inputs.to("cuda", dtype=torch.bfloat16)
|
59 |
generation_args = {
|
60 |
"max_new_tokens": max_new_tokens,
|
61 |
"repetition_penalty": repetition_penalty,
|