Testing-AI-Contain / docs /structure.md
Pujan-Dev's picture
push to testing branch
b8aa51a
## πŸ—οΈ Project Structure
```bash
AI-Checker/
β”‚
β”œβ”€β”€ app.py # Main FastAPI entry point
β”œβ”€β”€ config.py # Configuration settings
β”œβ”€β”€ Dockerfile # Docker build script
β”œβ”€β”€ Procfile # Deployment entry for platforms like Heroku/Railway
β”œβ”€β”€ requirements.txt # Python dependency list
β”œβ”€β”€ README.md # Main project overview πŸ“˜
β”‚
β”œβ”€β”€ features/ # Core AI content detection modules
β”‚ β”œβ”€β”€ image_classifier/ # Classifies AI vs Real images
β”‚ β”‚ β”œβ”€β”€ controller.py
β”‚ β”‚ β”œβ”€β”€ model_loader.py
β”‚ β”‚ └── preprocess.py
β”‚ β”œβ”€β”€ image_edit_detector/ # Detects tampered or edited images
β”‚ β”œβ”€β”€ nepali_text_classifier/ # Classifies Nepali text as AI or Human
β”‚ β”‚ β”œβ”€β”€ controller.py
β”‚ β”‚ β”œβ”€β”€ inferencer.py
β”‚ β”‚ β”œβ”€β”€ model_loader.py
β”‚ β”‚ └── preprocess.py
β”‚ └── text_classifier/ # Classifies English text as AI or Human
β”‚ β”œβ”€β”€ controller.py
β”‚ β”œβ”€β”€ inferencer.py
β”‚ β”œβ”€β”€ model_loader.py
β”‚ └── preprocess.py
β”‚
β”œβ”€β”€ docs/ # Internal documentation and API references
β”‚ β”œβ”€β”€ api_endpoints.md
β”‚ β”œβ”€β”€ deployment.md
β”‚ β”œβ”€β”€ detector/
β”‚ β”‚ β”œβ”€β”€ ELA.md
β”‚ β”‚ β”œβ”€β”€ fft.md
β”‚ β”‚ β”œβ”€β”€ meta.md
β”‚ β”‚ └── note-for-backend.md
β”‚ β”œβ”€β”€ features/
β”‚ β”‚ β”œβ”€β”€ image_classifier.md
β”‚ β”‚ β”œβ”€β”€ nepali_text_classifier.md
β”‚ β”‚ └── text_classifier.md
β”‚ β”œβ”€β”€ functions.md
β”‚ β”œβ”€β”€ nestjs_integration.md
β”‚ β”œβ”€β”€ security.md
β”‚ β”œβ”€β”€ setup.md
β”‚ └── structure.md
β”‚
β”œβ”€β”€ IMG_Models/ # Stored model weights
β”‚ └── latest-my_cnn_model.h5
β”‚
β”œβ”€β”€ notebooks/ # Experimental/debug Jupyter notebooks
β”œβ”€β”€ static/ # Static files (e.g., UI assets, test inputs)
└── test.md # Test usage notes
```
### 🌟 Key Files and Their Roles
- **`app.py`**: Entry point initializing FastAPI app and routes.
- **`Procfile`**: Tells Railway (or similar platforms) how to run the program.
- **`requirements.txt`**: Tracks all Python dependencies for the project.
- **`__init__.py`**: Package initializer for the root module and submodules.
- **`features/text_classifier/`**
- **`controller.py`**: Handles logic between routes and the model.
- **`inferencer.py`**: Runs inference and returns predictions as well as file system
utilities.
- **`features/NP/`**
- **`controller.py`**: Handles logic between routes and the model.
- **`inferencer.py`**: Runs inference and returns predictions as well as file system
utilities.
- **`model_loader.py`**: Loads the ML model and tokenizer.
- **`preprocess.py`**: Prepares input text for the model.
- **`routes.py`**: Defines API routes for text classification.
[πŸ”™ Back to Main README](../README.md)