{"id":23139531,"url":"https://github.com/ezzcodeezzlife/nllb-api","last_synced_at":"2026-01-18T08:02:53.761Z","repository":{"id":241647329,"uuid":"807321780","full_name":"ezzcodeezzlife/NLLB-API","owner":"ezzcodeezzlife","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-28T22:06:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T10:29:19.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://translate-app-21oo8lou.devinapps.com/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezzcodeezzlife.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-28T22:03:28.000Z","updated_at":"2024-05-28T22:08:05.000Z","dependencies_parsed_at":"2024-05-29T13:46:46.318Z","dependency_job_id":null,"html_url":"https://github.com/ezzcodeezzlife/NLLB-API","commit_stats":null,"previous_names":["ezzcodeezzlife/nllb-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ezzcodeezzlife/NLLB-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezzcodeezzlife%2FNLLB-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezzcodeezzlife%2FNLLB-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezzcodeezzlife%2FNLLB-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezzcodeezzlife%2FNLLB-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezzcodeezzlife","download_url":"https://codeload.github.com/ezzcodeezzlife/NLLB-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezzcodeezzlife%2FNLLB-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28533758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T13:14:25.518Z","updated_at":"2026-01-18T08:02:53.175Z","avatar_url":"https://github.com/ezzcodeezzlife.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NLLB FastAPI Translation Service\n\n## Introduction\nThis project sets up a FastAPI service that uses the NLLB-200-Distilled model for translation requests. The service allows users to translate text between different languages using a RESTful API.\n\n## Requirements\n- Python 3.8 or higher\n- pip (Python package installer)\n- Hugging Face token (for accessing the NLLB-200-Distilled model)\n\n## Installation\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/facebookresearch/fairseq.git\n    cd fairseq\n    ```\n\n2. Set up a virtual environment:\n    ```bash\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n3. Install the required dependencies:\n    ```bash\n    pip install --editable ./\n    pip install fastapi uvicorn transformers\n    ```\n\n4. Download the NLLB-200-Distilled model:\n    ```bash\n    wget https://tinyurl.com/nllb200densedst600mcheckpoint -O checkpoint.pt\n    ```\n\n## Usage\n1. Activate the virtual environment:\n    ```bash\n    source venv/bin/activate\n    ```\n\n2. Start the FastAPI server:\n    ```bash\n    uvicorn main:app --reload\n    ```\n\n3. The server will be running at `http://127.0.0.1:8000`. You can access the translation endpoint at `http://127.0.0.1:8000/translate`.\n\n## Endpoint Description\n### POST /translate\n- **Description**: Translates the given text from the source language to the target language.\n- **Request Body**:\n    ```json\n    {\n        \"text\": \"Hello, world!\",\n        \"source_lang\": \"eng_Latn\",\n        \"target_lang\": \"fra_Latn\"\n    }\n    ```\n- **Response**:\n    ```json\n    {\n        \"translated_text\": \"Bonjour, le monde!\"\n    }\n    ```\n\n## Troubleshooting\n- Ensure that the Hugging Face token is provided when initializing the tokenizer and model.\n- If you encounter any issues with missing dependencies, make sure to install them using `pip install \u003cdependency_name\u003e`.\n- For any other issues, refer to the official documentation of the libraries used in this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezzcodeezzlife%2Fnllb-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezzcodeezzlife%2Fnllb-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezzcodeezzlife%2Fnllb-api/lists"}