User
Initial commit
979c7a7
|
raw
history blame
735 Bytes

Language Detection API

This is a FastAPI application that provides language detection capabilities using Facebook's FastText model.

Features

  • Language detection for 176 different languages
  • High accuracy using FastText's pre-trained model (lid.176.bin)
  • Simple REST API interface
  • Docker containerized

API Endpoints

GET /

Health check endpoint that confirms the API is running.

POST /detect

Detects the language of the provided text.

Request body:

{
    "text": "Your text here"
}

Response:

{
    "language": "en",
    "confidence": 0.976
}

Technical Details

  • Built with FastAPI and Python 3.9
  • Uses FastText v0.9.2
  • Containerized with Docker
  • Hosted on Hugging Face Spaces