Update README.md
Browse files
README.md
CHANGED
|
@@ -1,85 +1,86 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
title: Saarthi
|
| 4 |
-
sdk: gradio
|
| 5 |
-
emoji: ⚡
|
| 6 |
-
colorFrom: indigo
|
| 7 |
-
colorTo: gray
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
short_description: AI bot for Legal Help & ID Guidance – Anytime, Anywhere
|
| 11 |
-
sdk_version: 5.34.2
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
-
|
| 48 |
-
-
|
| 49 |
-
-
|
| 50 |
-
-
|
| 51 |
-
-
|
| 52 |
-
-
|
| 53 |
-
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
| 85 |
python app.py
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
title: Saarthi
|
| 4 |
+
sdk: gradio
|
| 5 |
+
emoji: ⚡
|
| 6 |
+
colorFrom: indigo
|
| 7 |
+
colorTo: gray
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
short_description: AI bot for Legal Help & ID Guidance – Anytime, Anywhere
|
| 11 |
+
sdk_version: 5.34.2
|
| 12 |
+
python_version: 3.11
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
# 🧠 Saarthi – Connecting Every Citizen to Justice and Identity Rights with AI
|
| 17 |
+
|
| 18 |
+
Saarthi is an open-source AI-powered web assistant designed to simplify **legal awareness** and **identity document assistance** for the common man. Built using Gradio, Sentence Transformers, and local knowledge bases, Saarthi bridges the gap between complex legal processes and everyday citizens.
|
| 19 |
+
|
| 20 |
+
> ⚖️ Whether you're confused about your rights or unsure where to begin your ID application, Saarthi is here to guide you — anytime, anywhere.
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## 🧭 Why Saarthi Matters
|
| 25 |
+
|
| 26 |
+
In India, many citizens don’t know where to begin when it comes to legal rights or ID corrections. Saarthi makes complex legal and bureaucratic processes understandable and accessible — especially for underrepresented communities.
|
| 27 |
+
|
| 28 |
+
It’s not just an AI project. It’s a public good.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## 🔍 Features
|
| 33 |
+
|
| 34 |
+
### 🟠 NyaySetu – Legal Q&A Chatbot
|
| 35 |
+
> _"Accurate, easy-to-understand legal help — anytime, anywhere."_
|
| 36 |
+
|
| 37 |
+
- Ask natural language questions about Indian laws (e.g., _"What is Section 498A?"_)
|
| 38 |
+
- Powered by **semantic retrieval** using MiniLM embeddings
|
| 39 |
+
- Trained on curated legal Q&A datasets
|
| 40 |
+
- Instant responses from offline-embedded knowledge (no API needed)
|
| 41 |
+
|
| 42 |
+
### 🪪 PehchaanSetu – Identity Document Guide
|
| 43 |
+
> _"Empower yourself. Know the process. Own your identity."_
|
| 44 |
+
|
| 45 |
+
- Get step-by-step guidance for applying, correcting, or reprinting:
|
| 46 |
+
- Aadhaar
|
| 47 |
+
- PAN Card
|
| 48 |
+
- Voter ID
|
| 49 |
+
- Caste Certificate
|
| 50 |
+
- Driving License
|
| 51 |
+
- Passport
|
| 52 |
+
- Ration Card
|
| 53 |
+
- All guidance is loaded dynamically from local folders
|
| 54 |
+
- Dropdown-based interface with **zero typing needed**
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## 🧠 How it Works
|
| 59 |
+
|
| 60 |
+
### 🔹 Legal Q&A Flow
|
| 61 |
+
1. Load precomputed MiniLM embeddings from `qa_embeddings.pkl`
|
| 62 |
+
2. Compute embedding for user query
|
| 63 |
+
3. Use cosine similarity to find the best match
|
| 64 |
+
4. Return the legally accurate, beginner-friendly response
|
| 65 |
+
|
| 66 |
+
### 🔹 ID Assistance Flow
|
| 67 |
+
1. User selects ID Type and Purpose
|
| 68 |
+
2. `id_assist_interface.py` dynamically constructs path
|
| 69 |
+
3. Loads `.txt` or `.md` from corresponding folder
|
| 70 |
+
4. Renders guidance with basic formatting
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## 🚀 Try it Out (Hugging Face Space)
|
| 75 |
+
|
| 76 |
+
> 👉 [Live Demo on Hugging Face Spaces](https://huggingface.co/spaces/raviix46/Saarthi)
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## ⚙️ Installation (For Local Development)
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
git clone https://github.com/raviix46/Saarthi.git
|
| 84 |
+
cd Saarthi
|
| 85 |
+
pip install -r requirements.txt
|
| 86 |
python app.py
|