Spaces:
Sleeping
Sleeping
Commit
·
ba4e1dd
1
Parent(s):
90878c1
Fix README with exact HF Spaces template format
Browse files- Added required sdk_version field
- Proper YAML frontmatter structure
- Matches HF Spaces configuration template exactly
- Clean metadata without corruption
README.md
CHANGED
|
@@ -1,263 +1,58 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
title: PensionBot
|
| 4 |
-
|
| 5 |
-
emoji: 🎤title: PensionBot - Voice Assistant
|
| 6 |
-
|
| 7 |
colorFrom: blue
|
| 8 |
-
|
| 9 |
-
colorTo: greenemoji: 🎤title: Voice Bot Government Assistanttitle: Rajasthan Pension Assistant
|
| 10 |
-
|
| 11 |
sdk: docker
|
| 12 |
-
|
| 13 |
-
app_file: app.
|
| 14 |
-
|
| 15 |
pinned: false
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# PensionBot - Voice Assistant 🎤sdk: docker
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
A sophisticated AI-powered voice assistant designed for government pension queries and document searches. Built with FastAPI, this backend provides comprehensive API endpoints for voice interaction, document processing, and intelligent responses.pinned: falsecolorFrom: bluecolorFrom: blue
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
## 🚀 Featureslicense: mit
|
| 30 |
-
|
| 31 |
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
|
|
|
|
| 35 |
- **Document Search**: RAG-based government document knowledge base
|
| 36 |
-
|
| 37 |
-
- **Hybrid AI**: Multiple LLM providers for optimal responses---
|
| 38 |
-
|
| 39 |
- **WebSocket Support**: Real-time communication
|
| 40 |
-
|
| 41 |
-
- **Authentication**: JWT-based secure accesssdk: dockersdk: gradio
|
| 42 |
-
|
| 43 |
-
- **Policy Analysis**: Visual charts and scenario analysis
|
| 44 |
-
|
| 45 |
-
# PensionBot - Voice Assistant 🎤
|
| 46 |
|
| 47 |
## 📡 API Endpoints
|
| 48 |
|
| 49 |
-
pinned: falsesdk_version: 4.44.0
|
| 50 |
-
|
| 51 |
- `GET /` - Service information and available endpoints
|
| 52 |
-
|
| 53 |
-
- `GET /health` - Health check with service statusA sophisticated AI-powered voice assistant designed for government pension queries and document searches. Built with FastAPI, this backend provides comprehensive API endpoints for voice interaction, document processing, and intelligent responses.
|
| 54 |
-
|
| 55 |
- `POST /chat` - Text-based conversation interface
|
| 56 |
-
|
| 57 |
-
- `WebSocket /ws` - Real-time voice and text communicationlicense: mitapp_file: gradio_app.py
|
| 58 |
-
|
| 59 |
- `GET /docs` - Interactive API documentation
|
| 60 |
|
| 61 |
-
## 🚀 Features
|
| 62 |
-
|
| 63 |
## 🛠 Technology Stack
|
| 64 |
|
| 65 |
-
app_port: 8000pinned: false
|
| 66 |
-
|
| 67 |
- **FastAPI**: High-performance web framework
|
| 68 |
-
|
| 69 |
-
- **LangChain**: AI orchestration and document processing- **Voice Processing**: Advanced ASR and TTS capabilities
|
| 70 |
-
|
| 71 |
-
- **LanceDB**: Vector database for document search
|
| 72 |
-
|
| 73 |
-
- **Whisper**: Speech-to-text processing- **Document Search**: RAG-based government document knowledge base---license: mit
|
| 74 |
-
|
| 75 |
-
- **Edge-TTS**: Text-to-speech synthesis
|
| 76 |
-
|
| 77 |
-
- **WebSocket**: Real-time communication- **Hybrid AI**: Multiple LLM providers for optimal responses
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
## 🔗 Usage- **WebSocket Support**: Real-time communicationdisable_embedding: false
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
The API is accessible at the base URL of this space. Use the `/docs` endpoint to explore the interactive API documentation.- **Authentication**: JWT-based secure access
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
### Example Usage:- **Policy Analysis**: Visual charts and scenario analysis# Voice Bot Government Assistant 🎤---
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
```bash
|
| 94 |
-
|
| 95 |
-
# Health check
|
| 96 |
-
|
| 97 |
-
curl https://chabhishek28-pensionbot.hf.space/health## 📡 API Endpoints
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
# Chat endpoint
|
| 102 |
-
|
| 103 |
-
curl -X POST https://chabhishek28-pensionbot.hf.space/chat \
|
| 104 |
-
|
| 105 |
-
-H "Content-Type: application/json" \- `GET /` - Service information and available endpointsA sophisticated AI-powered voice assistant designed for government policy queries and document searches. Built with FastAPI, this backend provides comprehensive API endpoints for voice interaction, document processing, and intelligent responses.# Rajasthan Government Assistant �️
|
| 106 |
-
|
| 107 |
-
-d '{"message": "Tell me about pension policies"}'
|
| 108 |
-
|
| 109 |
-
```- `GET /health` - Health check with service status
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
## 📋 Environment Variables- `POST /chat` - Text-based conversation interface
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
The following environment variables are required:- `WebSocket /ws` - Real-time voice and text communication
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
- `GOOGLE_API_KEY`: Google Gemini API key- `GET /docs` - Interactive API documentation## 🚀 FeaturesA sophisticated AI-powered assistant for Rajasthan government services that combines voice interaction, document search, and intelligent conversation capabilities. Built with FastAPI, LangChain, and advanced RAG (Retrieval-Augmented Generation) technology to help citizens access government information and services.
|
| 122 |
-
|
| 123 |
-
- `GROQ_API_KEY`: Groq API key for Whisper
|
| 124 |
-
|
| 125 |
-
- `TAVILY_API_KEY`: Tavily search API key
|
| 126 |
-
|
| 127 |
-
- `JWT_SECRET_KEY`: JWT authentication secret
|
| 128 |
-
|
| 129 |
-
## 🛠 Technology Stack
|
| 130 |
-
|
| 131 |
-
## 🔒 Security
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
This API includes JWT-based authentication for secure access to protected endpoints.
|
| 136 |
-
|
| 137 |
-
- **FastAPI**: High-performance web framework- **Voice Processing**: Advanced ASR and TTS capabilities## Features
|
| 138 |
-
|
| 139 |
-
## 📄 License
|
| 140 |
-
|
| 141 |
- **LangChain**: AI orchestration and document processing
|
| 142 |
-
|
| 143 |
-
MIT License - see LICENSE for details.
|
| 144 |
-
|
| 145 |
-
- **LanceDB**: Vector database for document search- **Document Search**: RAG-based government document knowledge base
|
| 146 |
-
|
| 147 |
-
---
|
| 148 |
-
|
| 149 |
- **Whisper**: Speech-to-text processing
|
| 150 |
-
|
| 151 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 152 |
-
- **Edge-TTS**: Text-to-speech synthesis- **Hybrid AI**: Multiple LLM providers for optimal responses- 🎙️ **Voice Interaction**: Speech-to-text and text-to-speech capabilities
|
| 153 |
-
|
| 154 |
-
- **WebSocket**: Real-time communication
|
| 155 |
-
|
| 156 |
-
- **WebSocket Support**: Real-time communication- 📚 **Document Search**: Advanced RAG system with government document knowledge
|
| 157 |
|
| 158 |
## 🔗 Usage
|
| 159 |
|
| 160 |
-
- **Authentication**: JWT-based secure access- 🤖 **Hybrid LLM**: Combines multiple AI models for optimal responses
|
| 161 |
-
|
| 162 |
The API is accessible at the base URL of this space. Use the `/docs` endpoint to explore the interactive API documentation.
|
| 163 |
|
| 164 |
-
- **Policy Analysis**: Visual charts and scenario analysis- 🔍 **Scenario Analysis**: Policy impact simulation and analysis
|
| 165 |
-
|
| 166 |
### Example Usage:
|
| 167 |
|
| 168 |
-
- 📊 **Chart Generation**: Visual policy impact charts
|
| 169 |
-
|
| 170 |
```bash
|
| 171 |
-
|
| 172 |
-
# Health check## 📡 API Endpoints- 🌐 **WebSocket Support**: Real-time communication
|
| 173 |
-
|
| 174 |
curl https://chabhishek28-pensionbot.hf.space/health
|
| 175 |
|
| 176 |
-
- 🛡️ **Authentication**: JWT-based user authentication
|
| 177 |
-
|
| 178 |
# Chat endpoint
|
| 179 |
-
|
| 180 |
-
curl -X POST https://chabhishek28-pensionbot.hf.space/chat \- `GET /` - Service information and available endpoints
|
| 181 |
-
|
| 182 |
-H "Content-Type: application/json" \
|
| 183 |
-
|
| 184 |
-
-d '{"message": "Tell me about pension policies"}'- `GET /health` - Health check with service status## API Endpoints
|
| 185 |
-
|
| 186 |
```
|
| 187 |
|
| 188 |
-
- `POST /chat` - Text-based conversation interface
|
| 189 |
-
|
| 190 |
-
## 📋 Environment Variables
|
| 191 |
-
|
| 192 |
-
- `WebSocket /ws` - Real-time voice and text communication- `GET /`: Root endpoint with service information
|
| 193 |
-
|
| 194 |
-
The following environment variables are required:
|
| 195 |
-
|
| 196 |
-
- `GET /docs` - Interactive API documentation- `GET /health`: Health check for all services
|
| 197 |
-
|
| 198 |
-
- `GOOGLE_API_KEY`: Google Gemini API key
|
| 199 |
-
|
| 200 |
-
- `GROQ_API_KEY`: Groq API key for Whisper- `POST /chat`: Text-based chat interface
|
| 201 |
-
|
| 202 |
-
- `TAVILY_API_KEY`: Tavily search API key
|
| 203 |
-
|
| 204 |
-
- `JWT_SECRET_KEY`: JWT authentication secret## 🛠 Technology Stack- `POST /search`: Document search functionality
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
## 🔒 Security- `WebSocket /ws`: Real-time voice and text communication
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
This API includes JWT-based authentication for secure access to protected endpoints.- **FastAPI**: High-performance web framework
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
## 📄 License- **LangChain**: AI orchestration and document processing## Technology Stack
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
MIT License - see LICENSE for details.- **LanceDB**: Vector database for document search
|
| 221 |
-
|
| 222 |
-
- **Whisper**: Speech-to-text processing- **Backend**: FastAPI, Python 3.11+
|
| 223 |
-
|
| 224 |
-
- **Edge-TTS**: Text-to-speech synthesis- **AI/ML**: LangChain, Hugging Face Transformers, Sentence Transformers
|
| 225 |
-
|
| 226 |
-
- **WebSocket**: Real-time communication- **Vector Database**: LanceDB
|
| 227 |
-
|
| 228 |
-
- **Voice**: Whisper ASR, Edge TTS
|
| 229 |
-
|
| 230 |
-
## 🔗 Usage- **Authentication**: JWT tokens
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
The API is accessible at the base URL of this space. Use the `/docs` endpoint to explore the interactive API documentation.## Environment Variables
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
### Example Usage:Set these in your Hugging Face Space secrets:
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
```bash- `GOOGLE_API_KEY`: For Gemini AI model
|
| 243 |
-
|
| 244 |
-
# Health check- `GROQ_API_KEY`: For Groq AI model
|
| 245 |
-
|
| 246 |
-
curl https://your-space-name.hf.space/health- `TAVILY_API_KEY`: For search capabilities
|
| 247 |
-
|
| 248 |
-
- `JWT_SECRET_KEY`: For authentication
|
| 249 |
-
|
| 250 |
-
# Chat endpoint
|
| 251 |
-
|
| 252 |
-
curl -X POST https://your-space-name.hf.space/chat \## Usage
|
| 253 |
-
|
| 254 |
-
-H "Content-Type: application/json" \
|
| 255 |
-
|
| 256 |
-
-d '{"message": "Tell me about government policies"}'Once deployed, the API will be available at your Hugging Face Space URL. Use the WebSocket endpoint for real-time voice interaction or the REST endpoints for text-based communication.
|
| 257 |
-
|
| 258 |
-
```# Updated for HF Spaces deployment
|
| 259 |
-
|
| 260 |
-
|
| 261 |
## 📋 Environment Variables
|
| 262 |
|
| 263 |
The following environment variables are required:
|
|
@@ -271,6 +66,4 @@ The following environment variables are required:
|
|
| 271 |
|
| 272 |
This API includes JWT-based authentication for secure access to protected endpoints.
|
| 273 |
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
MIT License - see LICENSE for details.
|
|
|
|
| 1 |
+
---
|
|
|
|
| 2 |
title: PensionBot
|
| 3 |
+
emoji: 🎤
|
|
|
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
+
colorTo: green
|
|
|
|
|
|
|
| 6 |
sdk: docker
|
| 7 |
+
sdk_version: "latest"
|
| 8 |
+
app_file: app.py
|
|
|
|
| 9 |
pinned: false
|
| 10 |
+
---
|
| 11 |
|
| 12 |
+
# PensionBot - Voice Assistant 🎤
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
A sophisticated AI-powered voice assistant designed for government pension queries and document searches. Built with FastAPI, this backend provides comprehensive API endpoints for voice interaction, document processing, and intelligent responses.
|
| 15 |
|
| 16 |
+
## 🚀 Features
|
| 17 |
|
| 18 |
+
- **Voice Processing**: Advanced ASR and TTS capabilities
|
| 19 |
- **Document Search**: RAG-based government document knowledge base
|
| 20 |
+
- **Hybrid AI**: Multiple LLM providers for optimal responses
|
|
|
|
|
|
|
| 21 |
- **WebSocket Support**: Real-time communication
|
| 22 |
+
- **Authentication**: JWT-based secure access
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## 📡 API Endpoints
|
| 25 |
|
|
|
|
|
|
|
| 26 |
- `GET /` - Service information and available endpoints
|
| 27 |
+
- `GET /health` - Health check with service status
|
|
|
|
|
|
|
| 28 |
- `POST /chat` - Text-based conversation interface
|
| 29 |
+
- `WebSocket /ws` - Real-time voice and text communication
|
|
|
|
|
|
|
| 30 |
- `GET /docs` - Interactive API documentation
|
| 31 |
|
|
|
|
|
|
|
| 32 |
## 🛠 Technology Stack
|
| 33 |
|
|
|
|
|
|
|
| 34 |
- **FastAPI**: High-performance web framework
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
- **LangChain**: AI orchestration and document processing
|
| 36 |
+
- **LanceDB**: Vector database for document search
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
- **Whisper**: Speech-to-text processing
|
| 38 |
+
- **Edge-TTS**: Text-to-speech synthesis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## 🔗 Usage
|
| 41 |
|
|
|
|
|
|
|
| 42 |
The API is accessible at the base URL of this space. Use the `/docs` endpoint to explore the interactive API documentation.
|
| 43 |
|
|
|
|
|
|
|
| 44 |
### Example Usage:
|
| 45 |
|
|
|
|
|
|
|
| 46 |
```bash
|
| 47 |
+
# Health check
|
|
|
|
|
|
|
| 48 |
curl https://chabhishek28-pensionbot.hf.space/health
|
| 49 |
|
|
|
|
|
|
|
| 50 |
# Chat endpoint
|
| 51 |
+
curl -X POST https://chabhishek28-pensionbot.hf.space/chat \
|
|
|
|
|
|
|
| 52 |
-H "Content-Type: application/json" \
|
| 53 |
+
-d '{"message": "Tell me about pension policies"}'
|
|
|
|
|
|
|
| 54 |
```
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## 📋 Environment Variables
|
| 57 |
|
| 58 |
The following environment variables are required:
|
|
|
|
| 66 |
|
| 67 |
This API includes JWT-based authentication for secure access to protected endpoints.
|
| 68 |
|
| 69 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|