File size: 1,950 Bytes
6b1df02
e2bb8e8
 
 
 
6b1df02
e2bb8e8
6b1df02
 
e2bb8e8
 
ffe34a7
6b1df02
 
e2bb8e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
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. |