CoolFace
Apppublic

zh-ai-community/china-ai-policy-research

sourceHugging Faceapache-2.0updated 5d agoView on Hugging Face
33likes
App README

China AI Policy

A working index of official Chinese AI-governance documents, browsable by year and topic. Built with Next.js and deployed as a Docker Space.

English summaries (on demand)

Many entries have no official English translation. Each document has a Summary in English button that generates a short, factual brief on demand: the /api/summarize route best-effort fetches the Chinese source page, strips it to plain text, and asks an LLM for a 2–4 sentence summary plus key points. Results are cached in the browser, so revisiting a document is instant.

Nothing is generated at build time, so new rows added to content/policies.json get summaries automatically the first time someone opens them.

Turn it on

Add an access token in Settings → Variables and secrets:

NameTypeNotes
HF_TOKENsecretRequired. A Hugging Face access token (read scope).
SUMMARY_MODELvariableOptional. Defaults to Qwen/Qwen2.5-72B-Instruct.
SUMMARY_API_URLvariableOptional. Defaults to the Hugging Face Inference router.

Until a token is set, the button stays visible and explains what to configure — the rest of the site works without it.

Any OpenAI-compatible chat endpoint works: point SUMMARY_API_URL at another provider and set SUMMARY_API_KEY instead of HF_TOKEN.

Data

The document list lives in content/policies.json. Each entry:

json
{
  "zh": "中文标题",
  "en": "English title",
  "link": { "zh": "https://…", "en": "https://…" },
  "releaseDate": "2024-07-03",
  "tags": ["domestic", "industry"]
}

Tags drive the topic filter: domestic, international, safety, data, industry, ethics.

Develop

bash
npm install
npm run dev      # http://localhost:3000
npm run build    # production build (what the Dockerfile runs, via bun)

Citation

@misc{china_ai_policy_2024,
  title  = {China AI Policy Research},
  author = {Tiezhen Wang, Adina Yakefu, Lu Cheng},
  year   = {2024},
}