# abdulmohsena/faseeh architecture

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

- Interactive diagram: https://gitdiagram.com/abdulmohsena/faseeh
- Repository: https://github.com/abdulmohsena/faseeh

## Overview

##### Main Components
- Training Module – Represented by files in the "train" folder (main.ipynb, cloud_train.ipynb, and train_modal.py). This module is responsible for data ingestion (even if not explicitly in the file tree, the training scripts would include preprocessing), training the translation model, and saving model checkpoints.
- Evaluation & Inference Module – Captured in the "eval" folder (metrics.ipynb) and via Inference_Strategy.ipynb. This part evaluates the trained model using different metrics (BLEU, COMET, BERTSCORE, etc.) and demonstrates how inference is carried out.
- Model Repository/Packaging – The "repo" directory (with its contained Faseeh module/directory) likely houses the model’s code or a packaged version, which might be used for deployment or integration (as also indicated by the hug link to the model repository on Hugging Face).
- External Resources – Although not explicitly detailed in the file tree, the README mentions a connection to a Hugging Face model repository. Also, the "requirements.txt" file signals dependency management for various libraries/frameworks used in the project.

##### Out the Relationships and Data Flow
- “Trained Model” output to the Evaluation & Inference Module, indicating that the model undergoes performance assessment.
- Optionally, indicate external dependencies like Python libraries (from requirements.txt) and external services (the Hugging Face model repository).

##### Architectural Patterns or Principles
- Separation of Concerns – There is a clear division between training, evaluation, and deployment/inference.
- Modularity – Different notebooks and scripts are grouped by their purpose (training in one folder, evaluation in another, and packaging/integration in the “repo”). This modular approach should be reflected by grouping those components together.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "ML Translation Pipeline"
        DP["Data Preprocessing"]:::module
        TM["Training Module"]:::module
        TM -->|"produces"| TMK(("Trained Model/Checkpoints")):::storage
        TMK -->|"evaluates"| EIM["Evaluation & Inference Module"]:::module
        EIM -->|"deploys"| MR["Model Repository/Packaging"]:::module
        MR -->|"integrates_to"| HF[/"Hugging Face Model Repository"/]:::external
    end

    D["Python Dependencies"]:::external

    D -->|"provides"| TM
    D -->|"provides"| EIM

    classDef module fill:#cce5ff,stroke:#1a75ff,stroke-width:2px;
    classDef storage fill:#ccffcc,stroke:#33cc33,stroke-width:2px,stroke-dasharray: 5, 5;
    classDef external fill:#fff2cc,stroke:#e69500,stroke-width:2px,stroke-dasharray: 5, 5;

    click TM "https://github.com/abdulmohsena/faseeh/blob/main/train/main.ipynb"
    click EIM "https://github.com/abdulmohsena/faseeh/blob/main/eval/metrics.ipynb"
    click MR "https://github.com/abdulmohsena/faseeh/tree/main/repo/Faseeh"
    click D "https://github.com/abdulmohsena/faseeh/blob/main/requirements.txt"
```
