Skip to content

This repo is the comprehensive guide, covering Langchain integration with Huggingface models. Learn to build, deploy, and optimize cutting-edge AI applications through hands-on projects and real-world examples.

License

Notifications You must be signed in to change notification settings

mohd-faizy/GenAI-with-Langchain-and-Huggingface

Repository files navigation

GenAI with Langchain and Huggingface 🤗

GenAI Overview

author Python 3.9+ Streamlit Ollama LangChain HuggingFace License: MIT

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.

GenAI Overview

Overview of Generative AI Pipeline

Table of Contents

Overview

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.

What is GenAI?

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
GenAI_img

Types of Generative AI

Types of Generative AI

Different Types of Generative AI Models and Their Applications

Supported Model Types

  1. Text Generation Models

    • GPT-based models
    • T5 variants
    • BERT derivatives
  2. Image Generation

    • Stable Diffusion
    • DALL-E integration
    • Midjourney-like implementations
  3. Audio Processing

    • Speech-to-Text
    • Text-to-Speech
    • Audio Generation

⭐Builder's Perspective

1. Foundation Model Architecture

Foundation Model

2. Model Training Pipeline

Training Pipeline

3. Data Processing

Data Processing

4. Model Architecture

Model Architecture

5. Training Infrastructure

Training Infrastructure

6. Deployment Strategy

Deployment Strategy

⭐User's Perspective

1. Interface Design

Interface Design

2. User Interaction

User Interaction

3. Response Generation

Response Generation

4. System Integration

System Integration

5. Performance Metrics

Performance Metrics

Installation

# 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

🛂Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⚖ ➤ License

This project is licensed under the MIT License. See the LICENSE file for details.

❤️ Support

If you find this repository helpful, show your support by starring it! For questions or feedback, reach out on Twitter(X).

🪙Credits and Inspiration

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.

🔗Connect with me

➤ If you have questions or feedback, feel free to reach out!!!


About

This repo is the comprehensive guide, covering Langchain integration with Huggingface models. Learn to build, deploy, and optimize cutting-edge AI applications through hands-on projects and real-world examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published