Spaces:
Running
Running
| title: Sagar's Personal Assistant | |
| emoji: π | |
| colorFrom: purple | |
| colorTo: blue | |
| sdk: streamlit | |
| sdk_version: "1.41.0" | |
| app_file: app.py | |
| pinned: false | |
| # Sagar's Personal Assistant π | |
| A friendly, personal RAG-based chatbot that answers questions about Sagar using AI and documents (`resume.pdf`, `myself.txt`). | |
| ## Features | |
| - π€ Powered by Google AI Studio Gemini 2.5 Flash | |
| - π¬ Friendly, warm personality with emoji responses | |
| - π RAG (Retrieval-Augmented Generation) for accurate answers | |
| - π¨ Clean Streamlit web interface | |
| ## Setup | |
| 1. **Install Dependencies**: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 2. **Environment Variables**: | |
| Ensure `.env` exists with your `GOOGLE_API_KEY`. | |
| ## Usage | |
| 1. **Ingest Data**: | |
| Process your PDFs and text files to create the vector database. | |
| ```bash | |
| python src/ingest.py | |
| ``` | |
| *Run this whenever you add new files to the `data/` folder.* | |
| 2. **Run Chatbot (Web Interface)**: | |
| Start the Streamlit web chat interface. | |
| ```bash | |
| streamlit run app.py | |
| ``` | |
| 3. **Run Chatbot (CLI)**: | |
| Start the command-line interface. | |
| ```bash | |
| python src/main.py | |
| ``` | |
| ## Project Structure | |
| - `data/`: Place your PDF and TXT files here. | |
| - `app.py`: Streamlit web application. | |
| - `src/rag.py`: Core RAG logic (Retrieval + Generation). | |
| - `src/main.py`: Command-line interface. | |
| - `src/ingest.py`: Script to load data and generate embeddings (FAISS). | |
| - `src/vectorstore/`: Stores the generated FAISS index. |