# oam11/automl architecture

> Architecture diagram of the GitHub repository oam11/automl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oam11/automl
- Repository: https://github.com/oam11/automl

## Overview

##### File structure
- Top-level files:
- app.py – streamlit application entrypoint (defines UI, routing, session state).
- index.html – custom static page (e.g., landing page or template override).
- requirements.txt – dependency list.
- .devcontainer/ – VS Code dev container config for a reproducible dev environment.
- README.md, LICENSE – documentation.
- There are no separate “frontend” and “backend” folders; the Python process hosts both. Logic is modularized within app.py (or imported modules).

##### Extract architectural insights from the README
- UI layer: Streamlit sidebar + pages for data upload, EDA, ML workflows, and an “Ask Questions” chat interface.
- Business Logic:
- Data Management (upload, encoding detection, persistence via Streamlit session state or temporary storage).
- EDA Module (ydata-profiling report generation, visual exploration).
- AutoML Module (classification, regression, clustering, anomaly detection, time series) via PyCaret.
- NLP Interface (LangChain + Groq’s Llama 3.3 for context-aware QA).
- External dependencies & services: Groq API for LLM inference.
- Output artifacts: downloadable trained model files, profile reports, cluster assignments.

1. User Browser (Client)
2. Streamlit Server (Python Runtime)
- UI Layer (Streamlit widgets, pages)
- Data Manager
- EDA Engine (ydata-profiling)
- AutoML Engine (PyCaret submodules)
- NLP Engine (LangChain orchestrator + Groq LLM calls)
3. Data Storage
- In-memory / session state (Streamlit cache)
- Temporary file store (uploaded CSVs, sample datasets)
4. External Service
- Groq API (Llama inference)
- Browser → Streamlit UI: user actions (file upload, button clicks, chat queries)
- Streamlit UI → Data Manager: store/retrieve datasets in session state or disk
- Data Manager → EDA Engine: raw data passed for profiling
- EDA Engine → Streamlit UI: report objects and plots rendered
- Streamlit UI → AutoML Engine: train/evaluate models, retrieve metrics
- AutoML Engine → Streamlit UI: visualizations, downloadable model artifacts
- Streamlit UI → NLP Engine: user questions + data context forwarded
- NLP Engine → Groq API External Service: REST/gRPC calls with prompt/context
- Groq API → NLP Engine: LLM responses → rendered in UI
c. Architectural patterns & design principles:
- Single-process modular design (monolith) using Streamlit’s page routing.
- Separation of concerns: UI vs. data management vs. ML vs. NLP.
- Stateless external inference (Groq API) vs. stateful session data.
- Pluggable ML engines (via PyCaret) and profiling tool (ydata-profiling).
d. Key technologies & libraries (annotate each component):
- Streamlit (UI/control flow)
- PyCaret (AutoML)
- ydata-profiling (exploratory profiling)
- LangChain + groq (natural language interface)
- Pandas/Numpy (data handling)
- Plotly/Matplotlib/Seaborn (visualizations)

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User Browser"]:::ui

    subgraph "Streamlit Server (Python Runtime)"
      direction TB
      UI["UI Layer\n(Streamlit widgets, pages)"]:::ui
      DM["Data Manager\n(upload, session state)"]:::backend
      EDA["EDA Engine\n(ydata-profiling)"]:::backend
      AutoML["AutoML Engine\n(PyCaret)"]:::backend
      NLP["NLP Engine\n(LangChain + Groq Llama)"]:::backend
    end

    subgraph "Data Storage"
      direction TB
      Session["In-memory / Session State"]:::storage
      Temp["Temporary File Store"]:::storage
    end

    External["Groq API (Llama Inference)"]:::external

    User -->|"actions"| UI
    UI -->|store/retrieve| DM
    DM -->|raw data| EDA
    EDA -->|reports/plots| UI
    UI -->|train/evaluate| AutoML
    AutoML -->|metrics/artifacts| UI
    UI -->|queries/context| NLP
    NLP -->|REST/gRPC| External
    External -->|responses| NLP

    click UI "https://github.com/oam11/automl/blob/main/app.py"
    click DM "https://github.com/oam11/automl/blob/main/app.py"
    click EDA "https://github.com/oam11/automl/blob/main/app.py"
    click AutoML "https://github.com/oam11/automl/blob/main/app.py"
    click NLP "https://github.com/oam11/automl/blob/main/app.py"
    click CustomStatic "https://github.com/oam11/automl/blob/main/index.html"
    click DevEnv "https://github.com/oam11/automl/blob/main/.devcontainer/devcontainer.json"
    click Req "https://github.com/oam11/automl/blob/main/requirements.txt"
    click Doc "https://github.com/oam11/automl/blob/main/README.md"
    click Lic "https://github.com/oam11/automl/tree/main/LICENSE"
    click Ignore "https://github.com/oam11/automl/blob/main/.gitignore"

    classDef ui fill:#BBDEFB,stroke:#0D47A1,stroke-width:2px,shape:round;
    classDef backend fill:#E3F2FD,stroke:#1976D2,stroke-width:2px;
    classDef storage fill:#C8E6C9,stroke:#2E7D32,stroke-width:2px;
    classDef external fill:#FFE0B2,stroke:#EF6C00,stroke-width:2px;
```
