StudyLens for my tensed sister juggling with her academics A developer built StudyLens, a privacy-first study tool that turns lecture PDFs and text files into active-learning material entirely on the user's machine using Ollama and Google's Gemma 3 1B model. The Streamlit app avoids cloud APIs, accounts and telemetry, relying on a lightweight keyword-overlap retrieval scheme that sends roughly 30% of a document to the LLM and a multi-strategy JSON parser to handle the small model's unreliable output. It was built over six sprints in three days for the developer's sister, who reported after midterms prep, "Wait, it's actually free? And my PDFs don't get uploaded anywhere? This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend https://dev.to/challenges/hacktoberfest-weekend-2026-10-01 Built for: My younger sister, who's drowning in lecture PDFs and needs a study tool that works offline, respects her privacy, and doesn't require a $20/month subscription. StudyLens turns passive reading into active learning — completely on your machine. No API keys, no cloud, no accounts, no telemetry. Upload a PDF/TXT → Get: ollama pull gemma3:1b ollama serve pip install -r requirements.txt streamlit run app.py Opens at http://localhost:8501 — works on any machine that runs Python + Ollama tested on macOS, Linux, Windows . github.com/ShashwatSinha03/HF BuildForAFriend https://github.com/ShashwatSinha03/HF BuildForAFriend study-lens/ ├── app.py Streamlit UI + orchestration ├── llm.py Ollama client + prompts + robust JSON parsing ├── document.py PDF/TXT extraction + keyword retrieval ├── requirements.txt └── README.md Stack: Python • Streamlit • Ollama • Gemma 3 1B • PyPDF • Requests Architecture decisions that matter: | Constraint | Solution | |---|---| | No cloud/API keys | Local Ollama + Gemma 3 1B 815MB | | Small model, unreliable JSON | Multi-strategy parser standard → trailing-comma fix → duplicate-key removal → regex fallback | | No embeddings/vector DB | Lightweight keyword-overlap retrieval TF-IDF-inspired, ~30% of doc sent to LLM | | Limited compute | Single LLM call per action; batch short-answer eval; conservative token limits | | Privacy-first | Zero network calls except localhost:11434; session-only state | Sprint-based development 6 sprints over 3 days : This project exists because of open weights and local inference. If I'd used a closed API: With Gemma 3 1B + Ollama: The "small model" constraints forced better engineering: lightweight retrieval, strict prompting, defensive parsing, batch evaluation. Those are better patterns that scale up — not compromises. "Wait, it's actually free? And my PDFs don't get uploaded anywhere? Damn, broski" Yep, that's my sister, after using it for her midterms prep That's the whole point. Open innovation doesn't just lower barriers — it changes what's possible to build for the people you care about.