CoolFace
Apppublic

bhuvanesh-123/antarctic-navigation

sourceHugging Faceupdated 11d agoView on Hugging Face
0likes
App README

Antarctic Navigation Decision Support System — Hugging Face Space

Smart India Hackathon PS-26059 · MoES / NCPOR

AI-enabled Antarctic sea-ice forecasting, iceberg trajectory prediction, weather/ocean data, A* routing with multiplicative cost model + risk and fuel models. Built with FastAPI + SQLite + scikit-learn (backend) and React + TypeScript + Tailwind + Leaflet + Recharts (frontend, served as static files from the same uvicorn process).

What this Space does

  • Sea-ice concentration grid (Antarctic-wide) + point forecast at +24/+48/+72/+96/+120h
  • Iceberg tracking with trajectory forecasts (physics drift + learned residual)
  • Weather & ocean point queries (wind, pressure, temperature, visibility, waves, current, SST)
  • Risk analysis composite 0–100 score with component breakdown
  • Route optimization A* over lat/lon grid with 4 priority modes (balanced, safest, fastest, fuel-efficient)
  • Fuel model base consumption + ice/current/wave/weather penalties
  • Data upload CSV → quality report
  • Live Antarctic map with layer toggles, vessel + iceberg markers, route overlay

Data provenance

  • Real iceberg positions from USNIC (U.S. National Ice Center) Antarctic Iceberg Bulletins, loaded into iceberg_catalog.db at build time / first boot via entrypoint.sh.
  • Sea-ice, weather, ocean, and vessel demo environment are synthetic/demo fields generated by backend/app/services/synthetic_data.py and clearly labelled as such in every API response (data_source: "synthetic/demo").

Running locally (without Docker)

bash
# Backend + frontend dev servers
cd backend
.venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000   # API + served frontend

# Frontend only (Vite dev proxy forwards /api → localhost:8000)
cd frontend
npm run dev   # → http://localhost:5173  (proxy: /api → localhost:8000)

Docker (local)

bash
docker build -t antarctic-nav .
docker run -d -p 7860:7860 --name antarctic-nav antarctic-nav
# Site:  http://localhost:7860
# API:   http://localhost:7860/api/...
# Docs:  http://localhost:7860/docs

Deploy to Hugging Face Spaces

See DEPLOY-HF.md for the exact git-push commands and free-tier limits.

Environment variables / Secrets (Space Settings → Variables)

VariableRequiredDefaultNotes
HF_HOMEauto(HF sets)Workspace root; CSVs + DB live here on ephemeral disk
PYTHONPATHno/home/user/appSet in entrypoint.sh
Any API keys / tokensnoThis prototype uses no external API keys — Leaflet is keyless, no paid services are called. Do not add secrets unless you later integrate a paid data source.

Free-tier limits (Hugging Face Spaces, Docker Basic, CPU)

  • Idle sleep: the Space sleeps after ~48 hours of inactivity; wake-up cold start is 30–90s.
  • Ephemeral disk: the Space's disk is wiped on restart/sleep; entrypoint.sh re-creates iceberg_catalog.db on every boot. If the USNIC CSV source isn't present at boot time, endpoints fall back to synthetic/demo icebergs (still functional).
  • No uptime guarantee: this is a free CPU Basic Space — do not rely on it for production or time-critical workloads.
  • Prototype disclaimer: all ML outputs are labelled synthetic/demo. Not certified for real-world vessel navigation.

License

MIT.