Terguami is a FastAPI application powered by a custom transformer model built with PyTorch. It provides fast and accurate English-to-Amharic translations, with features like Docker support and interactive OpenAPI documentation, making it a scalable and easy-to-deploy solution for machine translation.
# Terguami: English-to-Amharic Translation API
This repository provides an English-to-Amharic translation API built with **FastAPI**. The core of the application is a custom transformer-based model trained from scratch using **PyTorch** on a carefully curated dataset. It offers a robust, scalable solution for translating English text into Amharic, with performance and extensibility in mind.
---
## β¨ Features
- π **High-Performance API**: Powered by FastAPI for asynchronous, fast, and efficient HTTP requests.
- π§ **Custom Transformer Model**: A transformer-based machine learning model developed from scratch with PyTorch.
- π **Custom Dataset**: The model is trained on a carefully curated dataset to ensure accurate English-to-Amharic translations.
- π **Extensible API**: Modular structure for easy integration with other systems or expansion with new features.
- π **OpenAPI Documentation**: Automatically generated and customizable API docs for developers.
---
## πΌοΈ Demo Images
### API in Action
---
## Table of Contents
1. Installation
2. Usage
3. Running with Docker
4. Endpoints
5. Model Details
6. Future Improvements
7. License
---
## βοΈ Installation
### Prerequisites
- **Python 3.10+**
- **pip** package manager
### Clone the Repository
```bash
git clone
github.com
cd terguami
```
### Install Dependencies
```bash
pip install -r requirements.txt
```
**`requirements.txt`**
```
fastapi==0.115.5
uvicorn==0.32.2
pydantic==2.9.2
pydantic-settings==2.6.1
numpy==1.26.3
tokenizers==0.15.0
torch==2.1.2
```
---
## π Usage
### Running the Server
To start the server locally, run:
```bash
uvicorn main:app --host 0.0.0.0 --port 7000 --reload
```
Once running, the API will be accessible at `
localhost`.
---
## π³ Running with Docker
### Prerequisites
- **Docker** installed on your machine.
### Build the Docker Image
```bash
docker build -t terguami:v1 .
```
### Run the Docker Container
```bash
docker run -d -p β¦