This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
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
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.