DEV Community

Cover image for Heritage Walk - Perth
TechGirl007
TechGirl007

Posted on

Heritage Walk - Perth

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

*Station to Swan * is a self-guided heritage walk through the old heart of Perth, Western Australia. It goes from Perth Railway Station, down through the arcades and sandstone of St Georges Terrace, to the Swan Bells on the river.

You open it on your phone and pick where you'd like to start. Then you follow a dotted trail on the map. When you get within 40 metres of a stop, it opens by itself: a photo, a short story told to you as you stand in front of the building, one thing to look for, and a "did you know?" fact. There's a 🔊 button if you'd rather keep your eyes on the building than the screen.

It's for anyone with a spare half hour in the city: office workers on a lunch break, visitors, or locals who walk past the Town Hall every day without knowing convicts built it.

Start at Walk
Perth Railway Station 12 stops · 1.5 km · ~43 min
Palace Hotel 10 stops · 1.1 km · ~33 min
Perth Town Hall 7 stops · 0.7 km · ~22 min
St George's Cathedral 5 stops · 0.5 km · ~16 min (fits a lunch break)
Swan Bells the full walk in reverse, from the river back up to the station

The screen is only there to point you at the real thing. The goal is to get you looking up, at arched windows and Flemish bond brickwork, instead of down at your phone.

Demo

👉 Try the walk. It works best on a phone. If you're not in Perth, tap the dots to explore.

Start picker: choose one of five starting points, with the route previewed on the map

Palace Hotel stop card with photo, guide text, something to look for, and a fun fact

And on my iPhone:

The dotted trail and numbered stops on a phone Treasury Buildings stop card on a phone

I completed a test on the phone through the live link on GitHub. I will complete a full test of the app when I am in the city next.

Code

GitHub logo TechGirl007 / HeritageWalk

Hacktoberfest 2026 Week 1 Challenge: Heritage Walk. PoC using Perth, Western Australia

Station to Swan: Perth Heritage Walk

A self-guided heritage walk from Perth Station down to the Swan River, written by an open-weight AI model running on a laptop.

Open the page on your phone, follow the dotted trail, and each stop's story opens when you get within 40 m.

Built for the DEV Hacktoberfest 2026 Open-Source AI Challenge, Week 1: "Touch Grass".

👉 Try the walk (best on a phone)

Start picker: choose one of five starting points along the trail, with the chosen route previewed on the map

Palace Hotel stop: photo, year built, gemma3's guide text, something to look for, and a fun fact

How it works

Wikipedia ─► fetch_wiki.py ─► gemma3 via Ollama ─► stops.json ─► build_page.py ─► index.html
  facts                        writes the guide      + overrides.json            map, dots, trail
                               (runs locally)         (human fact-check)
  1. fetch_wiki.py pulls each stop's article, coordinates and photo from Wikipedia into data/wiki.json.
  2. generate_guide.py asks gemma3 (running locally with Ollama) to turn each article into a short "you're standing in front of it" guide: story, what to look for, and a fun fact. Results are cached per stop.
  3. overrides.json…

How I Built It

My process

I used three AI tools along the way, but only one of them is in the product:

  1. Brainstorming with Copilot. My first idea was a bird identifier: take a photo, match it to a bird. That turned out to be much harder than I expected, so I went back to the drawing board. A heritage walk kept the "get outside and notice things" spirit, but swapped "is the AI right about this bird?" for "help me see the building in front of me."
  2. Installing Ollama and gemma3. I wanted the AI at the heart of the walk to be open and running on my own machine, so I installed Ollama and pulled Google's open-weight gemma3 (4B). gemma3 wrote every word of the tour.
  3. Building it with Claude. I used Claude as a coding partner to script the pipeline and architect the user experience: the map, the trail, the start picker, and how it behaves on a phone.

So the closed tools helped me build it, and the open model is it. Someone forking this repo only needs Python, Ollama and an internet connection for Wikipedia. No API keys, no accounts.

The pipeline

The whole thing is a small pipeline with an open-weight model in the middle:

Wikipedia ─► fetch_wiki.py ─► gemma3 via Ollama ─► stops.json ─► build_page.py ─► index.html
  facts                        writes the tour       + overrides.json             map, dots, trail
                               (on my laptop)         (my fact-checks)
Enter fullscreen mode Exit fullscreen mode
  1. The facts come from Wikipedia. A Python script pulls each building's article, coordinates and photo using the Wikipedia API.
  2. gemma3 writes the tour. Each article goes to gemma3 (4B) running locally in Ollama. Its brief is to be a friendly tour guide, write 50–70 words to someone standing outside the building, use only facts from the article, and reply in strict JSON (name, year built, tagline, story, something to look for, fun fact). On my laptop's CPU, each stop takes about 40 seconds.
  3. I fact-check gemma. This turned out to be the most interesting part (more below).
  4. The page is one HTML file. The stop text is baked into a single index.html with a Leaflet map and OpenStreetMap tiles. There's no backend and no account, and location never leaves your phone.

Things that went wrong (and what I learned)

My laptop ran out of memory. I have 7 GB of RAM and no GPU. gemma3 with a 4,096-token context peaked at 4.2 GB, and Linux's out-of-memory killer shut Ollama down partway through the run. Before it crashed outright, it was returning half-finished JSON, which looked like the model's fault but wasn't. Sending shorter article excerpts and a 2,560-token context fixed it, and every stop also got faster. I also added a cache, so a crash only costs one stop instead of the whole run.

The small model made a few things up, but only a few. I checked every stop against its Wikipedia article. Most were accurate, including some heavy history I didn't expect it to handle well (The Deanery stands where the Noongar elder Midgegooroo was executed in 1833). It got 4 stops wrong:

  • It said London Court's clocks cost A$12 million. That was actually the arcade's sale price in 1950. The clocks cost £5,000.
  • It said the Swan Bells were built in 1988. That's when the bells were donated. The tower opened for the millennium.
  • Twice, its "look for" pointed at something inside a building (a 1965 cinema screen, interior brickwork), which you can't see from the footpath.

So the AI writes the drafts and a human edits them. My corrections live in overrides.json, separate from gemma's output, so you can see exactly what I changed and the model's work stays honest.

The map broke when opened as a file. OpenStreetMap's main tile server returns 403 to pages opened straight from a file, so my "download it to your phone" plan showed a map that said Access blocked. Switching to OpenStreetMap's community tile servers, with an automatic fallback, fixed it. Proper hosting on GitHub Pages gives you GPS too, because phones only allow location on https:// pages.

What I'd add next

  • A walk for any town. Change the list of stops, rerun the script, and you have a new walk. The idea is "Perth today, your town tomorrow."
  • On-phone AI with an in-browser model, so you could ask the guide questions mid-walk, offline.
  • Different guide voices, like "for kids," "architecture nerd," or "ghost stories," all from the same facts.
  • A better voice for 🔊 Listen. Right now it uses the phone's built-in text-to-speech, and honestly it sounds pretty robotic. Pre-recording each stop with an open text-to-speech model like Piper or Kokoro would sound much more natural, and it would keep the whole thing open.

Why Does Open Innovation Matter?

  • It cost $0. Writing the tour for 12 stops, rerunning it while I tuned the prompt, and running it again after crashes cost nothing, because the model runs on my own laptop. I never had to watch a token meter.
  • It's private. Your location stays on your phone. There's no account and no server; the page doesn't even have a backend.
  • Anyone can make one. Open model, open map data (OpenStreetMap), open knowledge (Wikipedia), and open code. Someone in Fremantle, Hobart or Hamburg can fork the repo and make a walk for their own streets with no API keys and no bill.
  • It's honest. Because I run the model myself, I can see its exact output, keep my corrections separate, and show you both. The tour isn't a black box.

Prize Categories

Best Use of Gemma. gemma3 is the heart of this project, not a side feature. It ran locally on my laptop's CPU through Ollama (no GPU, 7 GB of RAM) and wrote every stop on the walk: the story, the tagline, the "look for" detail and the fun fact.

What I learned about using it well:

  • Strict JSON output (Ollama's format: "json") with a fixed set of fields made gemma's replies drop straight into the app, with validation and automatic retries for the odd broken reply.
  • "Use ONLY facts from the article below" kept it mostly honest. Across 12 stops, I corrected 4: two factual slips and two "look for" details you can't see from the street. The fixes live in a separate, visible overrides.json.
  • Smaller context, faster and more stable. Dropping to a 2,560-token context with article excerpts of 3,500 characters stopped the out-of-memory crashes and brought each stop down to about 40 seconds.

It shows a 4B open model running on an ordinary laptop is good enough to write a real, walkable city tour, for free.

Top comments (2)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

You need to verify your account.

Enter fullscreen mode Exit fullscreen mode

tr.ee/dev-to

Collapse
 
techgirl007 profile image
TechGirl007 •

I have reported you as a scam. tr.ee is a good indicator as a security risk. After testing it I identified that you are wanting money. I am putting an image to to WARN others about this. Personally, this is disgraceful. For you to prey on people like this. I hope @thepracticaldev permanently ban you from this site.