Closed LemurPwned closed 4 months ago
This pull request introduces several enhancements and fixes to the video sampler project. The changes include improvements to the image resizing function, refactoring of the ImageDescription class to support multiple APIs, updates to the README for better clarity, and modifications to the device selection logic in the gating module. Additionally, the sampler module has been updated to use the new ImageDescriptionDefault class.
Files | Changes |
---|---|
video_sampler/integrations/llava_chat.py video_sampler/sampler.py |
Refactored ImageDescription class and updated sampler module to use the new ImageDescriptionDefault class. |
README.md |
Updated documentation to reflect changes in the usage of OpenAI multimodal models and corrected spelling errors. |
video_sampler/gating.py |
Enhanced device selection logic to support MPS. |
Summary by Sourcery
This pull request introduces support for image summarization using OpenAI's API by adding a new
ImageDescriptionOpenAI
class. It also refactors the existingImageDescription
class to inherit fromPromptClient
and updates theImageDescriptionDefault
class. Additionally, support for MPS backend is added, and the README.md is updated with new instructions and environment variable details.ImageDescriptionOpenAI
class to support image summarization using OpenAI's API.video_sampler/gating.py
.ImageDescription
class to inherit fromPromptClient
and added a default URL.ImageDescriptionDefault
to use the new base class and modified the URL endpoint.summarise_image
method to handle different response formats and added environment variable support for model and API key.