Skip to content

Commit a1bf426

Browse files
rootroot
authored andcommitted
docs(site): publish gemini nano docs via pages
Add a minimal MkDocs site and pinned GitHub Pages workflow for the research repo. Ignore local docs build artifacts so verification stays clean.
1 parent 83a39e7 commit a1bf426

6 files changed

Lines changed: 149 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
steps:
21+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
22+
23+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install docs dependencies
28+
run: pip install mkdocs-material
29+
30+
- name: Build site
31+
run: mkdocs build
32+
33+
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
34+
with:
35+
path: ./site
36+
37+
deploy:
38+
permissions:
39+
pages: write
40+
id-token: write
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 10
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ node_modules/
22
__pycache__/
33
*.py[cod]
44
.venv/
5+
.tmp-docs-venv/
56
dist/
67
*.egg-info/
78
.coverage
89
htmlcov/
10+
site/
911
.env
1012
.refiner/
1113
**/.refiner/

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Experimental Gemini Nano on-device inference demos across browser, Python, and HTTP surfaces.
44

5+
Public documentation is published from `docs/` via `mkdocs.yml` and
6+
`.github/workflows/pages.yml`.
7+
58
## Components
69

710
| Directory | Language | Port | Status |

docs/index.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Gemini Nano
2+
3+
`gemini-nano` is the CAS research repo for local and browser-adjacent AI
4+
experiments. It keeps four standalone components instead of one shared runtime,
5+
so each surface can be validated independently.
6+
7+
## Components
8+
9+
| Component | Surface | Purpose |
10+
|---|---|---|
11+
| `api-server/` | Python HTTP API | FastAPI bridge for local model inference |
12+
| `chrome-bridge/` | Node.js HTTP API | Exposes Chrome Prompt API over HTTP |
13+
| `python-mediapipe/` | Python CLI | MediaPipe-based local inference path |
14+
| `chrome-demo/` | Browser demo | Direct in-browser Gemini Nano prompt testing |
15+
16+
## What this repo is for
17+
18+
- Prototyping on-device and near-device model flows
19+
- Verifying browser-native AI APIs without coupling them into the wider CAS stack
20+
- Comparing local inference surfaces before promoting any one path into broader CAS architecture
21+
22+
## Validation surfaces
23+
24+
- `chrome-bridge/npm test`
25+
- `python-mediapipe/run_nano.py`
26+
- `api-server/test_api.py`
27+
28+
## Current positioning
29+
30+
This repo is intentionally experimental. It is useful as a proving ground and
31+
integration reference, but it is not currently treated as a production CAS
32+
service.

docs/setup.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Setup
2+
3+
## Quick start
4+
5+
### API server
6+
7+
```bash
8+
cd api-server
9+
python -m venv .venv
10+
pip install -r requirements.txt
11+
python app.py
12+
```
13+
14+
### Chrome bridge
15+
16+
```bash
17+
cd chrome-bridge
18+
npm install
19+
npm start
20+
```
21+
22+
### Python MediaPipe
23+
24+
```bash
25+
cd python-mediapipe
26+
pip install -r requirements.txt
27+
python run_nano.py "What is Gemini Nano?"
28+
```
29+
30+
### Chrome demo
31+
32+
Open `chrome-demo/index.html` in Chrome Canary and enable:
33+
34+
- `chrome://flags/#prompt-api-for-gemini-nano`
35+
- `chrome://flags/#optimization-guide-on-device-model`
36+
37+
## Notes
38+
39+
- `chrome-bridge` depends on Chrome Canary support for the Prompt API.
40+
- `python-mediapipe` prints download instructions when the model asset is absent.
41+
- The repo intentionally keeps these paths separate rather than forcing a shared build.

mkdocs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
site_name: Gemini Nano
2+
site_description: Experimental on-device Gemini Nano demos across browser, Python, and HTTP surfaces.
3+
site_url: https://coding-autopilot-system.github.io/gemini-nano/
4+
repo_url: https://github.com/Coding-Autopilot-System/gemini-nano
5+
repo_name: Coding-Autopilot-System/gemini-nano
6+
theme:
7+
name: material
8+
features:
9+
- navigation.sections
10+
- navigation.top
11+
- content.code.copy
12+
markdown_extensions:
13+
- admonition
14+
- attr_list
15+
- md_in_html
16+
- tables
17+
- pymdownx.details
18+
- pymdownx.superfences
19+
nav:
20+
- Home: index.md
21+
- Setup: setup.md

0 commit comments

Comments
 (0)