LemurPwned / video-sampler

Effective frame sampling for ML applications.
https://lemurpwned.github.io/video-sampler/
MIT License
16 stars 5 forks source link

Lemur/mps pr up #24

Closed LemurPwned closed 4 months ago

LemurPwned commented 4 months ago

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 existing ImageDescription class to inherit from PromptClient and updates the ImageDescriptionDefault class. Additionally, support for MPS backend is added, and the README.md is updated with new instructions and environment variable details.

sourcery-ai[bot] commented 4 months ago

Reviewer's Guide by Sourcery

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.

File-Level Changes

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.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.