CoolFace
Apppublic

Jatin-Kumar/Bhasha_Stories

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

πŸ“š Bhasha Stories – Preserve India's Linguistic Heritage

An open-source, AI-powered platform to collect, transcribe, and share regional stories from across India.

🎯 Project Overview

Bhasha Stories is a professional-grade Streamlit web app built to capture India’s oral and written storytelling traditions in native languages and dialects. Users can upload audio, write text, and generate shareable story cards β€” all enhanced by modern AI tools like OpenAI Whisper, Sentence Transformers, and Groq's LLaMA 3.1 via API.

πŸ”— Live Demo

Access the application on Hugging Face Spaces:

![Live on Hugging Face Spaces](https://huggingface.co/spaces/Jatin-Kumar/Bhasha_Stories)

πŸ“ URL: https://huggingface.co/spaces/Jatin-Kumar/Bhasha_Stories

🌟 Key Features

  • β€”πŸŽ€ Multilingual Voice Recording – Upload stories in any Indian language.
  • β€”βœοΈ Text Story Submission – Submit stories directly in text using native scripts.
  • β€”πŸ”‰ Whisper-Based Transcription – Automatic speech-to-text with OpenAI Whisper.
  • β€”πŸ€– Groq-Powered AI Assistant – LLaMA 3.1 (8B Instant) via Groq API for natural language querying.
  • β€”πŸ” Semantic Search with RAG – Enhanced Retrieval-Augmented Generation using sentence-transformers.
  • β€”πŸŽ¨ Story Card Generator – Export visually appealing HTML-based story cards.
  • β€”πŸ“Š Analytics Dashboard – Real-time insights on story count, language coverage, and embedding health.
  • β€”β˜οΈ Supabase Integration – PostgreSQL/JSONB-backed persistent storage with semantic embedding storage.

🧠 AI Integrations

ComponentTechnology Used
TranscriptionOpenAI Whisper (Tiny, CPU-optimized)
Semantic EmbeddingSentence Transformers (MiniLM)
RAG + ChatGroq API with LLaMA 3.1 8B Instant
Search EmbeddingsSupabase + cosine similarity

πŸ“¦ Tech Stack

LayerTechnology
FrontendStreamlit (Custom dark UI)
BackendPython 3.10+
TranscriptionOpenAI Whisper (tiny)
EmbeddingsSentence Transformers (MiniLM)
AI ChatGroq API (LLaMA 3.1 8B)
StorageSupabase (PostgreSQL + JSONB)
HostingHugging Face Spaces / Streamlit Cloud

πŸš€ Getting Started

πŸ› οΈ Local Development Setup

  1. 1.Clone the repository
bash
   git clone https://gitlab.com/<your-group>/bhasha-stories.git
   cd bhasha-stories
  1. 1.Install Python dependencies
bash
   pip install -r requirements.txt
  1. 1.Add Supabase and Groq secrets

Create a .streamlit/secrets.toml file:

toml
   SUPABASE_URL = "https://<your-project>.supabase.co"
   SUPABASE_ANON_KEY = "<your-anon-key>"

Set your Groq API key in the Streamlit sidebar during runtime.

  1. 1.Run the app
bash
   streamlit run app.py

πŸ“‚ Directory Structure

bhasha-stories/
β”œβ”€β”€ app.py                    # Main Streamlit app
β”œβ”€β”€ requirements.txt          # Python packages
β”œβ”€β”€ .streamlit/
β”‚   └── secrets.toml          # Secrets (Supabase credentials)
β”œβ”€β”€ CONTRIBUTING.md           # Contribution guide
β”œβ”€β”€ LICENSE                   # MIT License
β”œβ”€β”€ stories_data/             # Local backup of stories
└── README.md                 # This file

πŸ“Š AI Analytics Dashboard

  • β€”Total stories & AI embedding coverage
  • β€”Language distribution of stories
  • β€”Average story length
  • β€”Embedding quality indicators
  • β€”Missing embedding alerts & auto-repair

🧲 Who It's For

AudienceUse Case
Cultural EnthusiastsRecord oral folktales and regional lore
Students/ResearchersCollect linguistic data for NLP & studies
FamiliesPreserve elders' memories in voice/text
Creators/EducatorsConvert stories into educational material

πŸ“ˆ Growth Strategy

ChannelPlan
Social MediaShare auto-generated story cards
AcademiaCollaborate with language departments
NGOs & OrgsConduct story collection drives
Local CompetitionsHost storytelling events in schools/villages
InfluencersPromote through regional YouTube/Instagram

πŸ“š Example Use Cases

  • β€”Archive endangered languages
  • β€”Personal memory preservation
  • β€”Research-grade multilingual corpora
  • β€”Story-of-the-day social feeds

🚧 Planned Enhancements

  • β€”πŸŒ AI-based translation between Indian languages
  • β€”πŸ“± Mobile-first PWA interface
  • β€”πŸ”ˆ Voice synthesis / playback of stories
  • β€”πŸ§  Advanced cross-lingual search + clustering

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for instructions.

You can contribute by:

  • β€”Adding folktales and sharing the platform with friends and family.

πŸ“„ License

MIT License See LICENSE for more information.

πŸ™ Acknowledgments

Made with πŸ’™ by the Viswam.ai Internship Team – Empowering linguistic diversity through AI.