This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
I built Greenstep, an app that tells you when to go outside — not just that you should.
Most "touch grass" tools work the same way: they tell you to take a break, go for a walk, get some fresh air. The advice is correct and useless. You already know you should go outside. The hard part is that at 6 PM, after a full day, there's no clear signal that this is the moment, and no specific place to go, and no reason to believe the walk will feel good. So you don't go.
Greenstep attacks all three problems at once:
- When — a tabular foundation model (TabPFN) reads a small log of your past outdoor behavior — sleep, screen time, mood, weather, which evening hours you actually went out — and predicts the single best 30-minute window for today.
- Where — SerpApi fetches a real, verified place near you: a park, a cafe, a walking loop. Not "a park nearby." A named place with a distance.
- What — Gemma 3 writes one specific, startable action for that window and place, with a first step and a fallback.
The output is short and finishable. Something like:
Walk through Lodhi Garden in Delhi. 25 minutes.
The mild evening temperature and your energy level suit a low-intensity stroll.
First step: put on your walking shoes.
Fallback: sit on a bench outside.
It's for anyone who knows they'd feel better after a walk, but needs the decision made for them. The whole thing runs on open models and is designed to sit on a second monitor, not beg for attention.
Demo
Code
How I Built It
Stack: FastAPI + Jinja + HTMX, SQLite for local history, and a three-model pipeline:
- TabPFN (Prior Labs) — reads a 150-row CSV of past behavior and predicts today's best hour. This is the part that makes it different: TabPFN is a tabular foundation model, not a language model. It's built for exactly this — small structured data, fast classification, no training loop.
- SerpApi — Google Maps search for places matching the predicted window (parks in the afternoon, cafes in the evening).
- Gemma 3 4B — runs locally through Ollama during development, and falls back to Google AI Studio's Gemma endpoint when deployed, so the whole thing can be tried without installing anything.
The inference layer is a single module (ai_provider.py) that switches between local and cloud with one environment variable:
AI_PROVIDER=local # Ollama + gemma3:4b on your machine
AI_PROVIDER=api # Gemma via Google AI Studio
Same prompt, same output schema, same code path. The only difference is the base URL. That means the app is honest about being local-first, and still demo-able as a link.
Gemma on the Gemini API has three quirks worth documenting because they cost me most of a day:
- It doesn't accept
system_instruction. Instructions have to live in the user message. - It doesn't accept
responseMimeType: "application/json". There is no JSON mode. The prompt has to enforce the format, and the parser has to be forgiving. - It doesn't accept
thinkingConfig, even though the model metadata reportsthinking: true.
The parser (_parse_json) strips markdown fences, cuts preamble before the first {, and cuts trailing text after the last }. That's what makes a small open model usable for a structured output app.
Why Does Open Innovation Matter?
Greenstep reads things most people would not want to hand to a third party: when you sleep, how much you scroll, how you felt each day, whether you left the house. A closed API version of this would mean shipping a behavioral diary to a vendor, paying per prediction, and hoping the model doesn't drift on them in six months.
Running Gemma locally changes what's possible:
- The history stays on the machine. The CSV never leaves. Neither does the inference.
- The deployed version uses the same open model. It's Gemma on Google AI Studio, not a closed replacement. One env var switches the runtime, not the model family.
- The prompt is auditable. You can read exactly what the app sends. With a closed API, that's a black box you trust.
- Swapping is trivial. When a better small model ships, the change is one line.
This is what open models enable: an app that can be personal without being creepy, local without being crippled, and specific without being expensive.
Prize Categories
- Best Use of Gemma — Gemma 3 4B via Ollama (local) and Gemma via Google AI Studio (deployed)
- Best Use of TabPFN — predicting the best outdoor window from a small behavioral CSV
- Best Use of SerpApi — grounding the suggestion in a real, named place nearby
- Best Use of Render — deployed FastAPI app with the Gemma cloud fallback
Top comments (0)