Leverage PaliGemma 2's DOCCI fine-tuned variant capabilities using LitServe.
0
stars
14
commits
Python
primary language
Feb 20, 2025
updated
PaliGemma 2 is an updated vision-language model that leverages Gemma 2 and SigLIP for superior performance on various vision-language tasks. It processes images and text to generate multilingual text outputs. This project shows how to create a self-hosted, private API that deploys PaliGemma 2's fine-tuned variant on the DOCCI dataset with LitServe, an easy-to-use, flexible serving engine for AI models built on FastAPI.
The project is structured as follows:
server.py: The file containing the main code for the web server.client.py: The file containing the code for client-side requests.LICENSE: The license file for the project.README.md: The README file that contains information about the project.assets: The folder containing screenshots for working on the application.images: The folder containing images for testing purposes..env.example: The example file for environment variables..gitignore: The file containing the list of files and directories to be ignored by Git.To get started with this project, follow the steps below:
python server.pypython client.pyNow, you can see the model's output based on the input request. The model will generate captions in the selected language for the images provided in the images folder.
Note: You need a Hugging Face access token to run the application. You can get the token by signing up on the Hugging Face website and creating a new token from the settings page. After getting the token, you can set it as an environment variable ACCESS_TOKEN in your system by creating a .env file in the project's root directory. Check the .env.example file for reference.
The project can be used to serve the PaliGemma 2 family of models using LitServe. It particularly allows you to input an image and select a language to generate a caption, suggesting potential use cases in semantic tagging, visual question answering, and more.
Contributions are welcome! If you would like to contribute to this project, please raise an issue to discuss the changes you want to make. Once the changes are approved, you can create a pull request.
This project is licensed under the Apache-2.0 License.
If you have any questions or suggestions about the project, feel free to contact me on my GitHub profile.
Happy coding! 🚀
14 commits
Python
100.0%
Leverage PaliGemma 2's DOCCI fine-tuned variant capabilities using LitServe.
0
stars
14
commits
Python
primary language
Feb 20, 2025
updated
PaliGemma 2 is an updated vision-language model that leverages Gemma 2 and SigLIP for superior performance on various vision-language tasks. It processes images and text to generate multilingual text outputs. This project shows how to create a self-hosted, private API that deploys PaliGemma 2's fine-tuned variant on the DOCCI dataset with LitServe, an easy-to-use, flexible serving engine for AI models built on FastAPI.
The project is structured as follows:
server.py: The file containing the main code for the web server.client.py: The file containing the code for client-side requests.LICENSE: The license file for the project.README.md: The README file that contains information about the project.assets: The folder containing screenshots for working on the application.images: The folder containing images for testing purposes..env.example: The example file for environment variables..gitignore: The file containing the list of files and directories to be ignored by Git.To get started with this project, follow the steps below:
python server.pypython client.pyNow, you can see the model's output based on the input request. The model will generate captions in the selected language for the images provided in the images folder.
Note: You need a Hugging Face access token to run the application. You can get the token by signing up on the Hugging Face website and creating a new token from the settings page. After getting the token, you can set it as an environment variable ACCESS_TOKEN in your system by creating a .env file in the project's root directory. Check the .env.example file for reference.
The project can be used to serve the PaliGemma 2 family of models using LitServe. It particularly allows you to input an image and select a language to generate a caption, suggesting potential use cases in semantic tagging, visual question answering, and more.
Contributions are welcome! If you would like to contribute to this project, please raise an issue to discuss the changes you want to make. Once the changes are approved, you can create a pull request.
This project is licensed under the Apache-2.0 License.
If you have any questions or suggestions about the project, feel free to contact me on my GitHub profile.
Happy coding! 🚀
14 commits
Python
100.0%