Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.1.0
Web Interface for Product Design Q&A
Quick Start
Start the Web Server
python3 web_app.py
Then open your browser to: http://localhost:5000
Features
- π¨ Modern UI: Clean, responsive design
- β‘ Fast Queries: Direct integration with Modal RAG
- π Source Citations: See which parts of the document were used
- π‘ Suggested Questions: Quick access to common queries
- β±οΈ Performance Metrics: See retrieval and generation times
Usage
- Start the server:
python3 web_app.py - Open browser: Navigate to
http://localhost:5000 - Ask questions: Type your question and click "Ask Question"
- View results: See answers with sources and timing info
Example Questions
- "What are the three product tiers and their premium ranges?"
- "What is the Year 3 premium volume projection?"
- "What coverage does the Standard tier include?"
- "What are the FSA licensing requirements?"
- "What are the key value propositions?"
Architecture
Browser (Frontend)
β HTTP POST
Flask Web App (web_app.py)
β Subprocess
Modal RAG System
β Query
ChromaDB + LLM
β Response
Flask Web App
β JSON
Browser (Display Results)
Files
web_app.py- Flask web servertemplates/index.html- Frontend HTMLstatic/css/style.css- Stylingstatic/js/app.js- Frontend JavaScript
Troubleshooting
Port Already in Use
# Use a different port
FLASK_RUN_PORT=5001 python3 web_app.py
Modal Not Found
- Make sure venv is activated or Modal is in PATH
- The web app auto-detects Modal in venv
Slow Queries
- First query: 10-15 seconds (cold start)
- Subsequent queries: 3-5 seconds
Customization
Change Port
Edit web_app.py:
app.run(debug=True, host='0.0.0.0', port=5001) # Change 5000 to 5001
Change Styling
Edit static/css/style.css
Add More Suggestions
Edit templates/index.html - add more chips in the suggestions section