Minimal web app to upload one or more PDFs, extract text, and generate an investment-focused analysis using an LLM via OpenRouter.
- Python 3.10+ recommended
Create a virtual environment (optional but recommended), then install dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCreate a .env file in this folder:
OPENROUTER_API_KEY=your_key_hereTip: you can copy .env.example to .env and then paste your key.
streamlit run app.pyThen open the URL Streamlit prints (usually http://localhost:8501).
- No file uploaded: the app will prompt you to upload at least one PDF.
- Empty/unreadable PDF text: those PDFs are skipped; if all are empty, analysis can’t run.
- Missing API key: set
OPENROUTER_API_KEYin.envor your environment. - API error: the app shows the HTTP error from OpenRouter.