Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ A minimal FastAPI app that accepts feedback and content-addition submissions.
|
|
| 5 |
`type: "feedback"` submissions go to feedback.jsonl (unchanged behavior).
|
| 6 |
Every other type (dataset/model/organization/blog/challenge/collaboration) is
|
| 7 |
a request that goes to requests.jsonl instead β the
|
| 8 |
-
|
| 9 |
`collaboration` requests additionally require `email` and `institution`, and
|
| 10 |
are acknowledged rather than turned into a PR (see that Space's PR_TYPES).
|
| 11 |
-
Both files live in the same
|
| 12 |
|
| 13 |
`dataset`/`model`/`organization`/`blog` requests carry the full structured
|
| 14 |
fields the moderator Space needs to render a src/data/*.js entry (slug,
|
|
@@ -17,9 +17,9 @@ this module derives the remaining fields (entry_id, org_id, link, blog slug)
|
|
| 17 |
that submitters shouldn't have to type by hand.
|
| 18 |
|
| 19 |
Deploy as a HF Space (Docker SDK):
|
| 20 |
-
|
| 21 |
Required Space secret:
|
| 22 |
-
HF_TOKEN β a write-scoped token for the
|
| 23 |
"""
|
| 24 |
|
| 25 |
import os
|
|
@@ -40,7 +40,7 @@ load_dotenv()
|
|
| 40 |
|
| 41 |
# ββ Config ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 42 |
|
| 43 |
-
DATASET_REPO = "
|
| 44 |
FEEDBACK_FILE = "feedback.jsonl"
|
| 45 |
REQUESTS_FILE = "requests.jsonl"
|
| 46 |
|
|
|
|
| 5 |
`type: "feedback"` submissions go to feedback.jsonl (unchanged behavior).
|
| 6 |
Every other type (dataset/model/organization/blog/challenge/collaboration) is
|
| 7 |
a request that goes to requests.jsonl instead β the
|
| 8 |
+
emmascharfmann/requests-review Space reads that file to approve/reject them.
|
| 9 |
`collaboration` requests additionally require `email` and `institution`, and
|
| 10 |
are acknowledged rather than turned into a PR (see that Space's PR_TYPES).
|
| 11 |
+
Both files live in the same emmascharfmann/feedback dataset.
|
| 12 |
|
| 13 |
`dataset`/`model`/`organization`/`blog` requests carry the full structured
|
| 14 |
fields the moderator Space needs to render a src/data/*.js entry (slug,
|
|
|
|
| 17 |
that submitters shouldn't have to type by hand.
|
| 18 |
|
| 19 |
Deploy as a HF Space (Docker SDK):
|
| 20 |
+
emmascharfmann/feedback-api
|
| 21 |
Required Space secret:
|
| 22 |
+
HF_TOKEN β a write-scoped token for the emmascharfman org
|
| 23 |
"""
|
| 24 |
|
| 25 |
import os
|
|
|
|
| 40 |
|
| 41 |
# ββ Config ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 42 |
|
| 43 |
+
DATASET_REPO = "emmascharfmann/request"
|
| 44 |
FEEDBACK_FILE = "feedback.jsonl"
|
| 45 |
REQUESTS_FILE = "requests.jsonl"
|
| 46 |
|