Spaces:
Runtime error
Runtime error
File size: 1,937 Bytes
23f437b |
1 2 3 4 5 6 7 8 9 10 11 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 86 87 88 89 90 91 92 93 94 95 96 |
# Quick Start Guide
## Prerequisites
- Python 3.13+
- Modal account and CLI installed
- Virtual environment (recommended)
## Setup
1. **Activate virtual environment:**
```bash
source venv/bin/activate
```
2. **Install dependencies:**
```bash
pip install flask flask-cors
# Or install all requirements if you have requirements.txt
pip install -r requirements.txt
```
3. **Index product design documents (first time only):**
```bash
modal run src/rag/modal-rag-product-design.py::index_product_design
```
## Running the Web Application
### Option 1: Using the helper script (Recommended)
```bash
./scripts/setup/start_web.sh
```
### Option 2: Direct Python command
```bash
# Make sure venv is activated
source venv/bin/activate
python src/web/web_app.py
```
### Option 3: From project root
```bash
python3 src/web/web_app.py
```
## Access the Web Interface
Once the server starts, open your browser and go to:
- **http://127.0.0.1:5000** (or the port shown in the terminal)
⚠️ **Important:** Use `127.0.0.1` instead of `localhost` to avoid potential 403 errors on macOS.
## Querying the RAG System
### Via Web Interface
1. Start the web app (see above)
2. Open the URL in your browser
3. Enter your question and click "Ask Question"
### Via CLI
```bash
python src/web/query_product_design.py --question "your question here"
```
### Via Modal Directly
```bash
modal run src/rag/modal-rag-product-design.py::query_product_design --question "your question here"
```
## Troubleshooting
### Flask Not Installed
```bash
# Activate venv
source venv/bin/activate
# Install Flask
pip install flask flask-cors
```
### Port Already in Use
The web app will automatically find an available port (5000-5009).
### Modal Command Not Found
```bash
# Install Modal CLI
pip install modal
# Or use python -m modal
python -m modal --version
```
For more help, see `docs/guides/TROUBLESHOOTING.md`.
|