惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
I
InfoQ
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
月光博客
月光博客
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
G
Google Developers Blog
小众软件
小众软件
宝玉的分享
宝玉的分享
Jina AI
Jina AI
V
Visual Studio Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
StarLens: Gemma 4 as Your Personal Planetarium Guide
Jose Angel M · 2026-05-10 · via DEV Community
Cover image for StarLens: Gemma 4 as Your Personal Planetarium Guide

Jose Angel Munoz

Gemma 4 Challenge: Build With Gemma 4 Submission

This is a submission for the Gemma 4 Challenge: Build with Gemma 4

What I Built

StarLens — an AI-powered night sky companion where Gemma 4 is the protagonist, not a bolt-on.

StarLens computes the real-time positions of 118,000 stars, 8 planets, the Sun, and Moon using NASA/JPL ephemeris data (Skyfield + Hipparcos catalog), then feeds that data into Gemma 4 so every answer is grounded in actual science — not hallucination.

It features 7 interactive tabs, each showcasing a different Gemma 4 capability:

  • 🌌 Tonight's Sky — Real-time sky map with Gemma narration. Tap any object and ask "Why is it there?" — Gemma explains the orbital mechanics.
  • 💬 Sky Chat — Multi-turn conversation with the full sky state injected as context. Ask "What's that bright thing in the south?" and Gemma looks up the real computed positions.
  • 🚀 Guided Tour — Gemma leads you through the sky step-by-step with exact directions, altitudes, and surprising facts — like a live planetarium show.
  • 🔄 Sky Comparison — Side-by-side charts showing how the sky transforms over 1-12 hours, with Gemma narrating what rises, sets, and shifts.
  • 📸 Photo Identification — Upload a night sky photo and Gemma's vision identifies constellations, stars, and planets — then the engine cross-validates against computed ephemeris positions.
  • 🔍 Deep Dive — Ask about any celestial object. Gemma receives the full star catalog via its 128K context window for comprehensive explanations.
  • 📋 Observation Planner — Gemma creates an optimized stargazing plan with best times, viewing order, and photography tips.

The multimodal round-trip is the highlight: StarLens renders a sky chart from ephemeris data, then feeds it back to Gemma 4's vision model for analysis — proving Gemma can both consume and reason about astronomical visualizations.

Demo

🎬 Watch the full demo (2:30)

Code

StarLens Code

How I Used Gemma 4

StarLens exercises 7 distinct Gemma 4 capabilities through 9 specialized methods:

Capability Method Model Why
Multimodal Vision identify_sky(), analyze_chart() gemma4:e4b Fast image analysis for photo ID and chart round-trip
128K Context Window explain_object() gemma4:31b-cloud Loads the entire Hipparcos star catalog for deep reasoning
Multi-Turn Chat chat() gemma4:31b-cloud Conversational sky Q&A with ephemeris as system context
Structured Reasoning explain_why() gemma4:31b-cloud Orbital mechanics and celestial geometry explanations
Narrative Generation guided_tour(), narrate_sky() gemma4:31b-cloud Step-by-step tours and engaging sky descriptions
Temporal Reasoning compare_skies() gemma4:31b-cloud Narrates how the sky transforms over hours
Cross-Validation identify_sky() + engine gemma4:e4b AI identifications checked against real ephemeris positions

Why these models?

  • gemma4:e4b for vision tasks — it's fast enough for interactive photo analysis and the multimodal round-trip where latency matters.
  • gemma4:31b-cloud for reasoning — the 128K context window is essential for loading full star catalogs, and the deeper reasoning produces better tour narrations and orbital mechanics explanations.

Users can switch models from the sidebar based on their hardware — all 9 methods respect the selection dynamically.

Architecture

The key insight is context injection: every Gemma call receives real computed astronomical data as context, so Gemma reasons from science, not training data. The engine layer orchestrates catalog computations and Gemma calls, cross-validates results, and builds the context that makes Gemma's answers accurate.

Built with Python, Gradio, Skyfield, Ollama, and pydantic-settings. Optional Redis caching and Docker deployment included.