This repository serves as a comprehensive guide for integrating Langchain with Huggingface models, enabling you to build, deploy, and optimize cutting-edge AI applications through hands-on projects and real-world examples.
This repository demonstrates the power of combining Langchain's composability with Huggingface's state-of-the-art models. We provide comprehensive examples and implementations for various Generative AI applications, from text generation to multimodal systems.
Generative AI is a branch of artificial intelligence that focuses on creating entirely new content — such as
text
,images
,audio
,code
, or video—by learning patterns, structures, and relationships from existing data. It mimics human creativity to generate outputs that are not only original but also remarkably similar to content produced by people, blurring the line between human-made and machine-generated work.
Generative AI is about learning the distribution of data so that it can generate a new sample from it.
- LLMs based apps like
ChatGPT
Diffusion
models for image- Code generating LLMs like
CodeLLama
- TTS models like
ElevenLabs
- Video gen model like
Sora
-
Text Generation Models
- GPT-based models
- T5 variants
- BERT derivatives
-
Image Generation
- Stable Diffusion
- DALL-E integration
- Midjourney-like implementations
-
Audio Processing
- Speech-to-Text
- Text-to-Speech
- Audio Generation
# Clone the repository from GitHub
git clone https://github.com/mohd-faizy/GenAI-with-Langchain-and-Huggingface.git
# Navigate into the cloned project directory
cd GenAI-with-Langchain-and-Huggingface
# Initialize a new uv project (creates pyproject.toml and sets up uv)
uv init
# Create a virtual environment using uv (similar to python -m venv .venv)
uv venv
# Activate the virtual environment
# For macOS/Linux:
.venv/bin/activate
# For Windows (use this instead):
# venv\Scripts\activate
# Install all required packages listed in requirements.txt
uv add -r requirements.txt
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
If you find this repository helpful, show your support by starring it! For questions or feedback, reach out on Twitter(X
).
This repository is inspired by the excellent course content created by Nitish on the CampusX YouTube channel & DataCamps Course Developing LLMs with LangChain. The implementation and examples in this repository are based on his comprehensive tutorials on Generative AI with Langchain and Huggingface.
➤ If you have questions or feedback, feel free to reach out!!!