ChatAI Streamlit App (with Admin, OpenAI & Ollama)
A Streamlit app that provides:
- Rounded chat interface with + button to upload files or images
- Supports OpenAI and Ollama providers
- Admin role can manage user accounts
- Conversation history (SQLite)
- Export chat to Markdown
Quickstart
Create a virtual environment (recommended)
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun the app
streamlit run app.pyLogin
On first run, a default admin account is created:- username:
admin - password:
admin123
👉 Immediately change this in Admin > Users.
- username:
Providers
- OpenAI: Set your key in the sidebar (OpenAI API Key) or via env var
OPENAI_API_KEY. - Ollama: Make sure Ollama is running locally (default endpoint
http://localhost:11434).
You can change endpoint in the sidebar.
Notes
- This is a reference implementation for local use. For production:
- Use a proper auth service (e.g., OAuth), secure key storage (e.g., Vault/KMS)
- Harden the admin endpoints and network access
- Add request limits, logging, and encryption-at-rest