Spaces:
Sleeping

faseehsandhu commited on
Commit
e16728e
Β·
1 Parent(s): c0a2512

Update README with new features: session-based uploads, dark mode, multi-user support

Browse files
Files changed (1) hide show
  1. README.md +41 -10
README.md CHANGED
@@ -27,10 +27,11 @@ This Streamlit web application combines conversational AI with smart retrieval t
27
 
28
  ### πŸ“Š Multi-Source Data Dictionary Management
29
  - **Default Dictionaries**: Pre-loaded data dictionaries available immediately on startup
30
- - **User Uploads**: Upload custom data dictionaries at runtime
31
  - **Multiple Format Support**: CSV (.csv), Excel (.xlsx, .xls), and PDF (.pdf) files
32
  - **Dictionary Controls**: Toggle dictionaries on/off, view metadata, delete user uploads
33
  - **Real-Time Metrics**: Live dashboard showing loaded dictionaries and cache status
 
34
 
35
  ### 🎯 Smart Retrieval System (RAG)
36
  - **Two-Stage Retrieval**: Combines fast keyword matching with AI semantic search
@@ -48,10 +49,12 @@ This Streamlit web application combines conversational AI with smart retrieval t
48
  - **Embedding Cache**: Prevents redundant API calls for previously seen queries
49
 
50
  ### 🎨 User Interface Components
 
51
  - **Main Chat View**: Message history, input box, index status badge, debug expander
52
  - **Sidebar Controls**: Navigation, retrieval settings, cache management, metrics dashboard
53
- - **Upload Management**: Drag-and-drop uploader with file list and delete functionality
54
  - **Retrieval Dashboard**: Live metrics for chunks indexed, embeddings cached, corpus signature
 
55
 
56
  ### βš™οΈ Advanced Configuration
57
  - **Top-k Slider**: Adjust precision vs recall (5-50 results)
@@ -103,7 +106,9 @@ streamlit-data-dictionary-chatbot
103
  βœ… **User Control**: Adjustable precision, cache management, dictionary selection
104
  βœ… **Conversational**: Natural follow-up questions and clarifications supported
105
  βœ… **Persistent**: Cache system ensures instant subsequent uses
106
- βœ… **Production-Ready**: Error handling, logging, graceful degradation built-in
 
 
107
 
108
  ## Use Case Example
109
 
@@ -198,15 +203,30 @@ Two-stage intelligent retrieval system that selects only the 1-2% most relevant
198
  - Batch embedding API calls for efficiency
199
  - Graceful fallback to keyword-only mode if embeddings unavailable
200
 
201
- ## Usage
202
 
203
- To run the application, execute the following command:
204
- ```
205
- streamlit run src/app.py
206
  ```
207
 
208
  Open your web browser and navigate to `http://localhost:8501` to access the application.
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  ## Technical Architecture
211
 
212
  **Frontend:** Streamlit (Python web framework)
@@ -220,9 +240,14 @@ Open your web browser and navigate to `http://localhost:8501` to access the appl
220
  **Search Algorithm:** Hybrid lexical + semantic retrieval
221
 
222
  **Cache Structure:**
223
- ```
224
- .cache/
225
- β”œβ”€β”€ chunks.json # Indexed dictionary entries
 
 
 
 
 
226
  β”œβ”€β”€ embeddings.json # Cached embedding vectors
227
  └── corpus_sig.txt # Dictionary change detection hash
228
  ```
@@ -261,6 +286,12 @@ AZURE_OPENAI_EMBEDDING_API_VERSION=2024-02-01
261
  **Solution:** Reduce top-k slider value or verify retrieval service is enabled.
262
 
263
  **Issue:** Embeddings not working
 
 
 
 
 
 
264
  **Solution:** Verify `AZURE_OPENAI_EMBEDDING_DEPLOYMENT` is set correctly. App falls back to lexical search.
265
 
266
  **Issue:** Cache not persisting
 
27
 
28
  ### πŸ“Š Multi-Source Data Dictionary Management
29
  - **Default Dictionaries**: Pre-loaded data dictionaries available immediately on startup
30
+ - **Session-Based User Uploads**: Upload custom data dictionaries at runtime (isolated per session)
31
  - **Multiple Format Support**: CSV (.csv), Excel (.xlsx, .xls), and PDF (.pdf) files
32
  - **Dictionary Controls**: Toggle dictionaries on/off, view metadata, delete user uploads
33
  - **Real-Time Metrics**: Live dashboard showing loaded dictionaries and cache status
34
+ - **Upload Privacy**: Uploaded files are session-specific and automatically discarded on page refresh
35
 
36
  ### 🎯 Smart Retrieval System (RAG)
37
  - **Two-Stage Retrieval**: Combines fast keyword matching with AI semantic search
 
49
  - **Embedding Cache**: Prevents redundant API calls for previously seen queries
50
 
51
  ### 🎨 User Interface Components
52
+ - **Dark Mode Theme**: Modern dark theme enabled by default for comfortable viewing
53
  - **Main Chat View**: Message history, input box, index status badge, debug expander
54
  - **Sidebar Controls**: Navigation, retrieval settings, cache management, metrics dashboard
55
+ - **Upload Management**: Drag-and-drop uploader with session-specific file tracking
56
  - **Retrieval Dashboard**: Live metrics for chunks indexed, embeddings cached, corpus signature
57
+ - **Multi-User Support**: Isolated conversations and session data for concurrent users
58
 
59
  ### βš™οΈ Advanced Configuration
60
  - **Top-k Slider**: Adjust precision vs recall (5-50 results)
 
106
  βœ… **User Control**: Adjustable precision, cache management, dictionary selection
107
  βœ… **Conversational**: Natural follow-up questions and clarifications supported
108
  βœ… **Persistent**: Cache system ensures instant subsequent uses
109
+ βœ… **Production-Ready**: Error handling, logging, graceful degradation built-in
110
+ βœ… **Multi-User Ready**: Isolated sessions with private conversations and uploads
111
+ βœ… **Privacy-First**: Session-based file uploads automatically cleaned on refresh
112
 
113
  ## Use Case Example
114
 
 
203
  - Batch embedding API calls for efficiency
204
  - Graceful fallback to keyword-only mode if embeddings unavailable
205
 
206
+ ### Running Locally
207
 
208
+ To run the application locally, execute the following command:
209
+ ```bash
210
+ streamlit run app.py
211
  ```
212
 
213
  Open your web browser and navigate to `http://localhost:8501` to access the application.
214
 
215
+ ### Deployed Application
216
+
217
+ Access the live application at: **https://faseewith custom dark theme
218
+ **Backend:** Python 3.x
219
+ **AI Services:**
220
+ - Azure OpenAI GPT-4o-mini (chat completions)
221
+ - Azure OpenAI text-embedding-3-large (semantic search)
222
+
223
+ **Data Processing:** Pandas, PyPDF2
224
+ **Storage:** File system with session-based isolation for uploads
225
+ **Search Algorithm:** Hybrid lexical + semantic retrieval
226
+ **Deployment:** Docker container on Hugging Face Spaces
227
+ **File Management:** Git LFS for large binary files (PDF, Excel)
228
+ Open your web browser and navigate to `http://localhost:8501` to access the application.
229
+
230
  ## Technical Architecture
231
 
232
  **Frontend:** Streamlit (Python web framework)
 
240
  **Search Algorithm:** Hybrid lexical + semantic retrieval
241
 
242
  **Cache Structure:**
243
+ ``` (global)
244
+ β”œβ”€β”€ embeddings.json # Cached embedding vectors (global)
245
+ └── corpus_sig.txt # Dictionary change detection hash
246
+
247
+ data/user_uploads/
248
+ β”œβ”€β”€ session_xxxxx/ # Session-specific upload directories
249
+ β”‚ └── user_file.xlsx # Files isolated per user session
250
+ └── .gitkeep
251
  β”œβ”€β”€ embeddings.json # Cached embedding vectors
252
  └── corpus_sig.txt # Dictionary change detection hash
253
  ```
 
286
  **Solution:** Reduce top-k slider value or verify retrieval service is enabled.
287
 
288
  **Issue:** Embeddings not working
289
+
290
+ **Issue:** Uploaded files disappear
291
+ **Solution:** This is expected behavior. Files are session-specific and removed on page refresh for privacy.
292
+
293
+ **Issue:** Dark mode not showing
294
+ **Solution:** Clear browser cache and refresh. Dark mode is set as default in `.streamlit/config.toml`.
295
  **Solution:** Verify `AZURE_OPENAI_EMBEDDING_DEPLOYMENT` is set correctly. App falls back to lexical search.
296
 
297
  **Issue:** Cache not persisting