Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def run_locally(
prompt: Optional[str],
) -> BlockResult:
# Convert each image to the format required by the model.
inference_images = [
inference_images = (
i.to_inference_format(numpy_preferred=False) for i in images
]
)
# Use the provided prompt (or an empty string if None) for every image.
prompt = prompt or ""
prompts = [prompt] * len(inference_images)
prompts = (prompt,) * len(images)

# Register SmolVLM2 with the model manager.
self._model_manager.add_model(model_id=model_version, api_key=self._api_key)
Expand All @@ -159,10 +159,9 @@ def run_locally(
prediction = self._model_manager.infer_from_request_sync(
model_id=model_version, request=request
)
response_text = prediction.response
predictions.append(
{
"parsed_output": response_text,
"parsed_output": prediction.response,
}
)
return predictions