Language Detection
docker pull cargoshipsh/language-detection
Automatically detect the language of an input text. This model is based on FastText and is trained on data from Wikipedia, Tatoeba and SETimes. The model itself is only 917kB in size and doesn't require a GPU to run.
Demo
Input
Predicted Language
en
License
The model itself is licensed under Creative Commons Attribution-Share-Alike License 3.0. The code for the API wrapper is licensed under MIT License.
System Requirements
Minimum: 1GB RAM, 1 vCPU
Recommended: 2GB RAM, 2 vCPU
API
If you don't want to implement the model all by yourself, no worries. Benefit from our easy to use API and get started right away!
Get StartedUsage
Input [POST]
{
"text": "This is a text in English"
}
Output
{
"language": "en"
}
You need to set an API Key via the environment variable API_KEY
to run the image and set the X-API-KEY
header in your request with the same KEY.
Need a more detailed setup guide?
To get more detailed instructions how to get started please check out our quick start guide in the docs.
Example
Make sure you have Docker installed then run the following command:
docker run -p 80:80 --env API_KEY=CHANGE_ME cargoshipsh/language-detection
In a new terminal window, run the following command to call the API
curl -X POST -H 'Content-type: application/json' -H 'X-API-Key: CHANGE_ME' --data '{"text":"Hello, World!"}' http://localhost:80
You see the output of the model in the terminal.
{"language":"en"}