Skip to content

Team-AI-ML/Linguist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linguist Pro 🌍

Linguist Pro is a high-performance, containerized FastAPI service for precision language detection. It is specifically optimized to handle short sentences and single words where traditional statistical models often fail.

✨ Features

  • Precision Detection: Powered by Meta's FastText (lid.176.bin) model for industry-standard accuracy.
  • Short-Text Optimized: Handles single words and short phrases (like "Hola" or "Hi") with high confidence.
  • Premium UI Playground: Built-in glassmorphism web interface with real-time animated confidence bars.
  • Developer First: Fully documented REST API with Swagger (OpenAPI) support.
  • Cloud Ready: Pre-configured Dockerfile with cold-start optimization.

🚀 Getting Started

Prerequisites

  • Python 3.11 or higher
  • [Optional] Docker

Local Installation

  1. Clone and setup:

    # Ensure you have a virtual environment
    python3 -m venv .venv
    source .venv/bin/activate  # On Windows use `.venv\Scripts\activate`
    
    # Install dependencies
    pip install -r requirements.txt
  2. Run the server:

    uvicorn main:app --host 0.0.0.0 --port 8000 --reload
  3. Access the Playground: Open http://localhost:8000 in your browser.

🐳 Docker Deployment

Linguist Pro is optimized for containerization. The build process pre-downloads the required 125MB AI model to ensure fast startup.

# Build the image
docker build -t linguist-pro .

# Run the container
docker run -p 8000:8000 linguist-pro

📡 API Documentation

Detect Language

POST /api/detect

Request:

{
  "text": "Bonjour tout le monde"
}

Response:

{
  "primary": {
    "lang": "fr",
    "name": "French",
    "confidence": 0.9946
  },
  "all_matches": [
    {
      "lang": "fr",
      "name": "French",
      "confidence": 0.9946
    }
  ],
  "error": null
}

🛠 Tech Stack

📝 License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors