# shrivastav-gaurav/genai-ml-notebook architecture

> Architecture diagram of the GitHub repository shrivastav-gaurav/genai-ml-notebook, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shrivastav-gaurav/genai-ml-notebook
- Repository: https://github.com/shrivastav-gaurav/genai-ml-notebook

## Overview

##### Project type and purpose
- This is not a service or web app but a collection of self-contained Jupyter notebooks demonstrating hands-on Generative AI, ML, data science, and Python exercises.
- The primary “runtime” environment is Google Colab (or local Jupyter), and the “deployment” is simply publishing these notebooks on GitHub.

##### File structure
- Top level: eight .ipynb notebooks and README.md.
- No subfolders for frontend/backend—every notebook stands alone.
- No CI/CD or build scripts; configuration and dependencies are implicit in each notebook.

##### README for additional insights
- The README frames this repo as a learning exercise.
- No explicit architecture sections, since each notebook bundles code, narrative, and outputs.

##### Elements
- Clear labels for:
- GitHub Repo
- Colab Environment
- Local Jupyter
- Python Libraries
- Data Sources
- Individual Notebooks (list each or group by category)
- Outputs (visualizations, trained models)
- Clone/Load from GitHub → Colab/Local Jupyter
- Data Sources → Notebooks
- Libraries → Notebooks
- Notebooks → Output artifacts
- Rectangles for compute environments (Colab, Local)
- Parallelograms for notebooks
- Clouds for external services (GitHub)

## Diagram (Mermaid)

```mermaid
graph TD
    %% Core components
    GitHub["GitHub Repository"]:::cloud
    Colab["Google Colab Environment"]:::environment
    Local["Local Jupyter Environment"]:::environment
    PythonLibs["Python Environment & Libraries"]:::lib
    DataSources["Data Sources"]:::data
    Outputs["Outputs (Visualizations & Models)"]:::output

    %% Environments flow
    GitHub -->|"Clone/Open"| Colab
    GitHub -->|"Clone/Open"| Local
    Colab -->|"Uses"| PythonLibs
    Local -->|"Uses"| PythonLibs

    %% Data and libraries to notebooks
    PythonLibs -->|"Imports"| HD
    PythonLibs -->|"Imports"| GenAI
    PythonLibs -->|"Imports"| GPT2
    PythonLibs -->|"Imports"| LLM
    PythonLibs -->|"Imports"| LangChainDemo
    PythonLibs -->|"Imports"| NGram
    PythonLibs -->|"Imports"| VectorDB

    DataSources -->|"Load Data"| HD
    DataSources -->|"Load Data"| GenAI
    DataSources -->|"Load Data"| GPT2
    DataSources -->|"Load Data"| LLM
    DataSources -->|"Load Data"| LangChainDemo
    DataSources -->|"Load Data"| NGram
    DataSources -->|"Load Data"| VectorDB

    %% Notebooks grouped
    subgraph "Image Demos"
        direction TB
        HD["Handwritten Digit Recognition Notebook"]:::notebook
        GenAI["Generative AI Text/Image Notebook"]:::notebook
    end

    subgraph "Text Demos"
        direction TB
        GPT2["GPT-2 Model Dissection Notebook"]:::notebook
        LLM["LLM Movie Review Writer Notebook"]:::notebook
    end

    subgraph "Other Demos"
        direction TB
        LangChainDemo["LangChain Demo Notebook"]:::notebook
        NGram["N-gram Language Model Notebook"]:::notebook
        VectorDB["Vector Database Experiment Notebook"]:::notebook
    end

    %% Notebooks to outputs
    HD -->|"Produce outputs"| Outputs
    GenAI -->|"Produce outputs"| Outputs
    GPT2 -->|"Produce outputs"| Outputs
    LLM -->|"Produce outputs"| Outputs
    LangChainDemo -->|"Produce outputs"| Outputs
    NGram -->|"Produce outputs"| Outputs
    VectorDB -->|"Produce outputs"| Outputs

    %% Click events for mapping
    click GitHub "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/README.md"
    click HD "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/Handwritten_Digit_Recognition_CPU.ipynb"
    click GenAI "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/Handson_GenAI_Generate_Text_Images_Notebook.ipynb"
    click GPT2 "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/Dissect_GPT2[1].ipynb"
    click LLM "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/LLM_movie_review_writer[1].ipynb"
    click LangChainDemo "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/LangChain.ipynb"
    click NGram "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/ngram_language_model.ipynb"
    click VectorDB "https://github.com/shrivastav-gaurav/genai-ml-notebook/blob/main/vector_db.ipynb"

    %% Styles
    classDef cloud fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1
    classDef environment fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20
    classDef lib fill:#FFF9C4,stroke:#F57F17,color:#F57F17
    classDef data fill:#FFE0B2,stroke:#E65100,color:#E65100
    classDef notebook fill:#F3E5F5,stroke:#6A1B9A,color:#6A1B9A
    classDef output fill:#D1C4E9,stroke:#4A148C,color:#4A148C
```
