Spaces:
Runtime error
Runtime error
File size: 880 Bytes
01e181e 979c7a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
---
title: Language Detection API
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: "3.9"
app_file: app.py
pinned: false
---
# 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:
```json
{
"text": "Your text here"
}
```
Response:
```json
{
"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
|