CoolFace
Apppublic

HomemadeMirpur/libretranslate

sourceHugging Faceagpl-3.0updated 2mo agoView on Hugging Face
0likes
App README

LibreTranslate CPU API on Hugging Face Spaces

This Space runs LibreTranslate as a Docker Space.

API test

Replace YOUR_USERNAME and YOUR_SPACE_NAME with your Hugging Face username and Space name.

bash
curl -X POST "https://YOUR_USERNAME-YOUR_SPACE_NAME.hf.space/translate" \
  -H "Content-Type: application/json" \
  -d '{"q":"Hello friend","source":"en","target":"pl","format":"text"}'

Expected response:

json
{
  "translatedText": "Witaj przyjacielu"
}

Loaded languages

This template loads only these languages to reduce CPU/RAM use:

  • —English: en
  • —Polish: pl
  • —Russian: ru
  • —Spanish: es
  • —French: fr
  • —German: de
  • —Korean: ko

To change this, edit LT_LOAD_ONLY in Dockerfile.

Important

Free Hugging Face Spaces can sleep after inactivity. First request after sleep can be slow because LibreTranslate has to start again.