Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.0.2
metadata
title: BharatLingo AI
emoji: ๐
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: true
license: mit
short_description: Free AI language tools for Indian languages
tags:
- translation
- grammar
- indian-languages
- nlp
๐ฎ๐ณ BharatLingo AI API
Free AI-powered language tools for all Indian languages.
Setup
Required Environment Variables
DEEPSEEK_API_KEY: Your DeepSeek API key for translation fallback
- Get your free API key from: https://platform.deepseek.com/
- Set in HuggingFace Space Settings โ Repository secrets โ Add secret
- Name:
DEEPSEEK_API_KEY - Value: Your API key (e.g.,
sk-xxxxxxxxxxxxx)
Without this key, the Space will work but translation fallback will be unavailable.
Features
- Translation: Translate between 13+ Indian languages using IndicTrans2
- Grammar Checker: Fix grammar errors in your text
- Spell Checker: Correct spelling mistakes
- Text Rewriter: Rewrite text in different styles (formal, casual, professional)
- Summarizer: Summarize long texts
- Paraphraser: Paraphrase while keeping meaning
Supported Languages
- English, Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati
- Kannada, Malayalam, Punjabi, Odia, Assamese, Bhojpuri
API Usage
This Space exposes API endpoints that can be called from any application:
Translation
from gradio_client import Client
client = Client("YOUR_USERNAME/bharatlingo-ai")
result = client.predict(
text="Hello, how are you?",
source_lang="english",
target_lang="hindi",
api_name="/translate"
)
Grammar Check
result = client.predict(
text="She don't likes apples.",
language="english",
api_name="/grammar"
)
JavaScript/Fetch API
const response = await fetch('https://YOUR_USERNAME-bharatlingo-ai.hf.space/api/translate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: ["Hello world", "english", "hindi"]
})
});
const result = await response.json();
Models Used
- Translation: ai4bharat/indictrans2 (fallback: facebook/nllb-200)
- Grammar: grammarly/coedit-large
- Text Generation: google/flan-t5-base
Credits
- AI4Bharat for IndicTrans2 models
- Hugging Face for hosting
- Built for BharatLingo.com