Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -89,11 +89,11 @@ class EndpointHandler:
|
|
89 |
prompt = self.processor.apply_chat_template(
|
90 |
messages, add_generation_prompt=True
|
91 |
)
|
92 |
-
processed_inputs = self.processor(
|
93 |
-
text=prompt, images=images, return_tensors="pt"
|
94 |
-
)
|
95 |
|
96 |
with torch.no_grad(), torch.autocast("cuda"):
|
|
|
|
|
|
|
97 |
generated_ids = self.model.generate(
|
98 |
**processed_inputs, generation_config=generation_config
|
99 |
)
|
|
|
89 |
prompt = self.processor.apply_chat_template(
|
90 |
messages, add_generation_prompt=True
|
91 |
)
|
|
|
|
|
|
|
92 |
|
93 |
with torch.no_grad(), torch.autocast("cuda"):
|
94 |
+
processed_inputs = self.processor(
|
95 |
+
text=prompt, images=images, return_tensors="pt"
|
96 |
+
)
|
97 |
generated_ids = self.model.generate(
|
98 |
**processed_inputs, generation_config=generation_config
|
99 |
)
|