Skip to content

chandrakantapanda/language-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Language Detector App using Python + FastAPI

This is a simple Language Detection Web App built using Python, FastAPI, and langdetect.
It can automatically identify the language of any text you enter — in seconds! ⚡


📹 YouTube Tutorial

🎥 Watch the full Shorts video here:
👉 Detect Any Language


🚀 Features

  • Detects languages like Hindi, English, French, German, Chinese, Japanese, and more.
  • Built with FastAPI for backend and HTML + JavaScript for frontend.
  • Real-time language detection response.
  • Simple, lightweight, and beginner-friendly.

🛠️ Tech Stack

  • Python 3.8+
  • FastAPI
  • Uvicorn
  • langdetect
  • Jinja2 (for HTML templates)

📂 Project Structure

├── main.py # FastAPI backend ├── templates/ │ └── index.html # Frontend HTML template ├── requirements.txt # Dependencies └── README.md # Project documentation


⚙️ Installation & Setup

1️⃣ Clone this repository

git clone https://github.com/your-username/language-detector-fastapi.git
cd language-detector-fastapi

2️⃣ Create a virtual environment (optional but recommended)

python -m venv venv
source venv/bin/activate    # for Linux/Mac
venv\Scripts\activate       # for Windows

3️⃣ Install dependencies

pip install -r requirements.txt

4️⃣ Run the FastAPI app

uvicorn main:app --reload

5️⃣ Open your browser

Visit 👉 http://127.0.0.1:8000

🧠 How It Works

The user types any text in the input box.

The frontend sends it to the /detect API route.

The FastAPI backend uses langdetect to identify the language.

The detected language name and code are displayed instantly on screen.


📦 Example Output

{
  "success": true,
  "language": "Hindi",
  "code": "hi"
}

👨‍💻 Author

Chandrakanta Panda 🔗 YouTube: @programmerchandra

📧 Feel free to connect and share ideas!

About

Detect Any Language Instantly using Python + FastAPI! Features: - Detects multiple languages like Hindi, English,etc - Real-time detection through FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors