request-moderator / README.md
Emma Scharfmann
add app
ffe34a7
|
Raw
History Blame Contribute Delete
1.95 kB
---
title: Hugging Science Requests Review
emoji: πŸ”¬
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.9.1
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_scopes:
- email
---
# Hugging Science β€” requests review
Standalone moderation tool for huggingscience.co, decoupled from the site's
own deploy. It works alongside the existing `hugging-science/feedback-api`
Space (see `../feedback-api/`), not instead of it:
1. `FeedbackWidget` on the site POSTs every submission to
`hugging-science-feedback-api.hf.space/submit`, same as before.
2. That Space now routes `type: "feedback"` to `feedback.jsonl` (unchanged)
and everything else β€” `dataset`/`model`/`organization`/`blog`/`challenge`
β€” to a new `requests.jsonl`, both in the `hugging-science/request` dataset.
3. **This Space** reads `requests.jsonl`, lets the site owner approve or
reject each pending row, and on approve opens a GitHub pull request
against [`georgiachanning/huggingscience-dot-co`](https://github.com/georgiachanning/huggingscience-dot-co)
adding the entry to the right `src/data/*.js` file. The site owner still
reviews and merges that PR by hand β€” this tool only removes the manual
data-entry step, not the final review.
## Required Space secrets
| Secret | Purpose |
| --- | --- |
| `GITHUB_TOKEN` | Fine-grained PAT scoped to `georgiachanning/huggingscience-dot-co` with `contents:write` + `pull-requests:write`. |
| `HF_TOKEN` | Write-scoped HF token for the `hugging-science` org, used to read/update `requests.jsonl`. |
| `ADMIN_USERS` | Comma-separated Hugging Face usernames allowed into the admin UI. |
## Optional Space variables
| Variable | Default | Purpose |
| --- | --- | --- |
| `HF_DATASET_REPO` | `hugging-science/request` | Dataset repo holding both `feedback.jsonl` and `requests.jsonl`. |
| `GITHUB_REPO` | `georgiachanning/huggingscience-dot-co` | Repo that approved requests open PRs against. |