This adds a tiny Flask-based web UI to run your local assistant. It uses your existing brain.py logic and vector search.
Files added:
app.py— Flask server with/UI and/api/chatendpointtemplates/index.html— simple chat UIstatic/chat.js— frontend JS to call the APIstatic/style.css— UI stylesrequirements.txt— Flask dependency
How to run (Windows PowerShell):
- Activate your virtual environment (from the project root):
.\venv\Scripts\Activate.ps1- Install requirements (only needed once):
pip install -r requirements.txt- Start the server:
python app.py- Open http://127.0.0.1:5000 in your browser and ask questions.
Notes:
- The server imports
brain.pyto reuse itssearch,format_context,prompt, andmodelobjects. Ensurebrain.pyworks standalone. - If you run into import errors, confirm your venv is activated and required packages are installed there.