Finalize official submission package

#1
Files changed (4) hide show
  1. README.md +31 -28
  2. SUBMISSION.md +22 -8
  3. VIDEO_SCRIPT.md +42 -0
  4. app.py +16 -0
README.md CHANGED
@@ -50,15 +50,18 @@ a polished Gradio Space built for the **Build Small Hackathon: Thousand Token Wo
50
 
51
  - [Build Small Hackathon event page](https://cerebralvalley.ai/e/build-small-hackathon)
52
  - [Official Hugging Face organization](https://huggingface.co/build-small-hackathon)
 
 
 
53
  - [Official registration and rules Space](https://huggingface.co/spaces/build-small-hackathon/registration)
54
  - [Official-organization 13-dimension quest dataset](https://huggingface.co/datasets/build-small-hackathon/hackathon-advisor-quest-dataset)
55
- - [Official-organization sponsor prize notes](https://huggingface.co/spaces/build-small-hackathon/hackathon-advisor/blob/main/docs/submission-notes.md)
56
  - [OpenBMB MiniCPM3-4B model card](https://huggingface.co/openbmb/MiniCPM3-4B)
57
  - [OpenBMB VoxCPM2 model card](https://huggingface.co/openbmb/VoxCPM2)
58
 
59
- The official registration app lists three rules: models at or below 32B parameters, Gradio
60
- plus Hugging Face Spaces, and a demo video plus social post. Submissions are due
61
- **June 15, 2026 at 23:59 UTC**.
 
62
 
63
  ## What It Does
64
 
@@ -219,43 +222,42 @@ and emotional temperature. Recent outputs are passed back as style memory during
219
  - User text is escaped before being placed in custom HTML.
220
  - Sendability is a playful estimate, not a guarantee of appropriateness.
221
 
222
- ## Official Quest Eligibility
223
-
224
- | Target | How GenreGoblin addresses it |
225
- |---|---|
226
- | Thousand Token Wood | Whimsical, useful AI-native message transformation |
227
- | OpenBMB | MiniCPM3-4B is the primary generation model |
228
- | Tiny Titan | MiniCPM3-4B and VoxCPM2 are both at or below 4B parameters |
229
- | Modal | Text runs on a Modal T4 and genre voice design runs on a Modal L4 |
230
- | Off-Brand | Fully custom parchment, neon green, purple-shadow Gradio design |
231
- | Best Agent | `GoblinRewriteAgent` performs model-tool calls, validation, an autonomous repair pass, and recovery |
232
- | Sharing is Caring | Synthetic trace examples and evaluation artifacts are published publicly |
233
- | Field Notes | Build decisions and small-model lessons are documented in `FIELD_NOTES.md` |
 
 
 
 
 
234
 
235
  Not claimed: **Off the Grid** (Modal is remote), **Well-Tuned** (no LoRA yet),
236
  **Llama Champion** (no llama.cpp runtime), **Backyard AI** (the primary track is whimsical),
237
- and **Nemotron** (no NVIDIA model in the current flow).
238
 
239
  ## OpenAI Codex Sponsor Prize
240
 
241
  GenreGoblin also targets **Best Use of Codex**, a sponsor prize separate from the
242
- official 13-dimension quest classifier. The official-organization sponsor notes define the
243
- requirement as Codex-attributed commits in the connected GitHub repository or Space.
244
 
245
  Codex implemented and tested the rewrite agent, genre quality system, VoxCPM2 integration,
246
  Modal deployment, UI refinement, evaluation scripts, and submission documentation. Final
247
- Space commits include the standard `Co-authored-by: Codex <codex@openai.com>` trailer.
 
248
 
249
  ## Demo Script
250
 
251
- 1. Click **I'm running late** to reveal the haunted railway announcement.
252
- 2. Point out the sendability and chaos meters.
253
- 3. Open **Behind the rewrite**, then briefly show the agent trace.
254
- 4. Enter `Please bring snacks too` under **Continue in the same voice**.
255
- 5. Use **Instant preview**, then **Generate genre voice** to compare browser and VoxCPM2 speech.
256
- 6. Open the share card and copy its social text.
257
- 7. Switch to **Anime Power-Up Speech**, intensity 5, for the finale.
258
- 8. Mention MiniCPM3-4B + VoxCPM2 on Modal, all models at or below 4B, and deterministic recovery.
259
 
260
  ## Structure
261
 
@@ -268,6 +270,7 @@ quality_eval.py 600-case genre/use-case/intensity quality matrix
268
  FIELD_NOTES.md Build journal and small-model lessons
269
  SUBMISSION.md Final links, prize claims, and demo checklist
270
  SOCIAL_POST.md Ready-to-publish social post draft
 
271
  data/ Synthetic privacy-safe agent trace examples
272
  requirements.txt Lightweight default Space dependencies
273
  requirements-local.txt Optional Transformers/Torch dependencies
 
50
 
51
  - [Build Small Hackathon event page](https://cerebralvalley.ai/e/build-small-hackathon)
52
  - [Official Hugging Face organization](https://huggingface.co/build-small-hackathon)
53
+ - [Official Field Guide Space](https://huggingface.co/spaces/build-small-hackathon/field-guide)
54
+ - [Field Guide rules and prize source](https://huggingface.co/spaces/build-small-hackathon/field-guide/blob/main/src/lib/data/content.ts)
55
+ - [Field Guide partner resources source](https://huggingface.co/spaces/build-small-hackathon/field-guide/blob/main/src/lib/data/partners.ts)
56
  - [Official registration and rules Space](https://huggingface.co/spaces/build-small-hackathon/registration)
57
  - [Official-organization 13-dimension quest dataset](https://huggingface.co/datasets/build-small-hackathon/hackathon-advisor-quest-dataset)
 
58
  - [OpenBMB MiniCPM3-4B model card](https://huggingface.co/openbmb/MiniCPM3-4B)
59
  - [OpenBMB VoxCPM2 model card](https://huggingface.co/openbmb/VoxCPM2)
60
 
61
+ The official Field Guide is the source of truth. It lists these core requirements: models
62
+ under 32B parameters, a Gradio app hosted as a Hugging Face Space inside the official
63
+ organization, a short demo video, a social post, and a README with the required links/tags.
64
+ Submissions close **June 15, 2026 at 23:59 UTC**.
65
 
66
  ## What It Does
67
 
 
222
  - User text is escaped before being placed in custom HTML.
223
  - Sendability is a playful estimate, not a guarantee of appropriateness.
224
 
225
+ ## Prize And Badge Eligibility
226
+
227
+ | Target | Status | How GenreGoblin addresses it |
228
+ |---|---|---|
229
+ | Thousand Token Wood main track | Eligible | Whimsical, useful AI-native message transformation where the small model is load-bearing |
230
+ | OpenBMB MiniCPM awards | Eligible | MiniCPM3-4B is the primary generation model and VoxCPM2 powers genre voice design |
231
+ | OpenAI Best Use of Codex | Eligible | Final Space commits are Codex-attributed and this README documents Codex's implementation work |
232
+ | Modal awards | Eligible | MiniCPM3-4B text runs on a Modal T4 and VoxCPM2 voice runs on a Modal L4 |
233
+ | Tiny Titan | Eligible | MiniCPM3-4B and VoxCPM2 are both at or below 4B parameters |
234
+ | Off-Brand | Eligible | Fully custom parchment, neon green, purple-shadow Gradio design |
235
+ | Best Agent | Eligible | `GoblinRewriteAgent` performs model-tool calls, validation, an autonomous repair pass, and recovery |
236
+ | Sharing is Caring | Eligible | Synthetic trace examples and evaluation artifacts are published publicly |
237
+ | Field Notes | Eligible | Build decisions and small-model lessons are documented in `FIELD_NOTES.md` |
238
+ | Best Demo | Pending final link | The app has a short demo script and share flow; add the published video URL above |
239
+ | Bonus Quest Champion | Competitive | Stacks several bonus-style criteria, strongest after final video/social links are added |
240
+ | Community Choice | Eligible after social post | Public Space is live; community traction depends on the final post |
241
+ | Judges' Wildcard | Considered | The project is a complete official-org Space with documented tradeoffs and tests |
242
 
243
  Not claimed: **Off the Grid** (Modal is remote), **Well-Tuned** (no LoRA yet),
244
  **Llama Champion** (no llama.cpp runtime), **Backyard AI** (the primary track is whimsical),
245
+ and **NVIDIA Nemotron Quest** (no Nemotron model in the current flow).
246
 
247
  ## OpenAI Codex Sponsor Prize
248
 
249
  GenreGoblin also targets **Best Use of Codex**, a sponsor prize separate from the
250
+ official 13-dimension quest classifier. The Field Guide defines the requirement as
251
+ Codex-attributed commits in the connected GitHub repository or Space.
252
 
253
  Codex implemented and tested the rewrite agent, genre quality system, VoxCPM2 integration,
254
  Modal deployment, UI refinement, evaluation scripts, and submission documentation. Final
255
+ Space commits include the standard `Co-authored-by: Codex <codex@openai.com>` trailer and
256
+ are recognized by Hugging Face as co-authored by Codex.
257
 
258
  ## Demo Script
259
 
260
+ Use [`VIDEO_SCRIPT.md`](VIDEO_SCRIPT.md) for the 30-45 second recording plan.
 
 
 
 
 
 
 
261
 
262
  ## Structure
263
 
 
270
  FIELD_NOTES.md Build journal and small-model lessons
271
  SUBMISSION.md Final links, prize claims, and demo checklist
272
  SOCIAL_POST.md Ready-to-publish social post draft
273
+ VIDEO_SCRIPT.md 30-45 second demo recording plan
274
  data/ Synthetic privacy-safe agent trace examples
275
  requirements.txt Lightweight default Space dependencies
276
  requirements-local.txt Optional Transformers/Torch dependencies
SUBMISSION.md CHANGED
@@ -4,7 +4,10 @@
4
 
5
  - Live Space: `https://huggingface.co/spaces/build-small-hackathon/GenreGoblin`
6
  - Live app: `https://build-small-hackathon-genregoblin.hf.space`
 
 
7
  - MiniCPM model: `https://huggingface.co/openbmb/MiniCPM3-4B`
 
8
  - Modal health: `https://krishnagaarg--genregoblin-minicpm-minicpmservice-health.modal.run`
9
  - VoxCPM health: `https://krishnagaarg--genregoblin-minicpm-voxcpmservice-health.modal.run`
10
  - Trace dataset: `https://huggingface.co/datasets/build-small-hackathon/genregoblin-traces`
@@ -25,11 +28,11 @@ Official event: `https://cerebralvalley.ai/e/build-small-hackathon`
25
 
26
  ### Main Track and Sponsor Prizes
27
 
28
- - Thousand Token Wood
29
- - OpenBMB
30
- - Best Use of Codex
31
- - Modal
32
- - Tiny Titan
33
 
34
  ### Achievement / Quest Claims
35
 
@@ -37,6 +40,17 @@ Official event: `https://cerebralvalley.ai/e/build-small-hackathon`
37
  - Off-Brand
38
  - Sharing is Caring
39
  - Field Notes
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  ## Demo Checklist
42
 
@@ -50,9 +64,9 @@ Official event: `https://cerebralvalley.ai/e/build-small-hackathon`
50
  8. Mention MiniCPM3-4B + VoxCPM2 on Modal, all models at or below 4B, and deterministic recovery.
51
 
52
  Best Use of Codex is an official sponsor prize, separate from the 13-dimension quest
53
- taxonomy. The official-organization sponsor notes require Codex-attributed commits in the
54
- connected GitHub repository or Space. Final Space commits use the standard Codex co-author
55
- trailer and the README documents Codex's work.
56
 
57
  ## Final Manual Items
58
 
 
4
 
5
  - Live Space: `https://huggingface.co/spaces/build-small-hackathon/GenreGoblin`
6
  - Live app: `https://build-small-hackathon-genregoblin.hf.space`
7
+ - Official Field Guide: `https://huggingface.co/spaces/build-small-hackathon/field-guide`
8
+ - Official HF organization: `https://huggingface.co/build-small-hackathon`
9
  - MiniCPM model: `https://huggingface.co/openbmb/MiniCPM3-4B`
10
+ - VoxCPM2 model: `https://huggingface.co/openbmb/VoxCPM2`
11
  - Modal health: `https://krishnagaarg--genregoblin-minicpm-minicpmservice-health.modal.run`
12
  - VoxCPM health: `https://krishnagaarg--genregoblin-minicpm-voxcpmservice-health.modal.run`
13
  - Trace dataset: `https://huggingface.co/datasets/build-small-hackathon/genregoblin-traces`
 
28
 
29
  ### Main Track and Sponsor Prizes
30
 
31
+ - Thousand Token Wood main track: eligible
32
+ - OpenBMB MiniCPM awards: eligible
33
+ - Best Use of Codex: eligible through Codex-attributed Space commits
34
+ - Modal awards: eligible through Modal runtime for MiniCPM3-4B and VoxCPM2
35
+ - Tiny Titan: eligible because the app uses 4B and 2B models only
36
 
37
  ### Achievement / Quest Claims
38
 
 
40
  - Off-Brand
41
  - Sharing is Caring
42
  - Field Notes
43
+ - Best Demo: pending the final published video link
44
+ - Bonus Quest Champion: competitive after demo and social links are added
45
+ - Community Choice: eligible after the public social post
46
+
47
+ ### Not Claimed
48
+
49
+ - Backyard AI: GenreGoblin is submitted for the whimsical Thousand Token Wood track.
50
+ - Off the Grid: the deployed app uses Modal-hosted inference.
51
+ - Well-Tuned: no LoRA or fine-tuned model is published.
52
+ - Llama Champion: no llama.cpp runtime is used.
53
+ - NVIDIA Nemotron Quest: no Nemotron model is used.
54
 
55
  ## Demo Checklist
56
 
 
64
  8. Mention MiniCPM3-4B + VoxCPM2 on Modal, all models at or below 4B, and deterministic recovery.
65
 
66
  Best Use of Codex is an official sponsor prize, separate from the 13-dimension quest
67
+ taxonomy. The Field Guide requires Codex-attributed commits in the connected GitHub
68
+ repository or Space. Final Space commits use the standard Codex co-author trailer, Hugging
69
+ Face recognizes Codex as a co-author on those commits, and the README documents Codex's work.
70
 
71
  ## Final Manual Items
72
 
VIDEO_SCRIPT.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GenreGoblin Demo Script
2
+
3
+ Target length: 30-45 seconds. Use a deadpan ElevenLabs narrator and goofy background music.
4
+
5
+ ## Shot List
6
+
7
+ 1. Open the live Space and show the hero section.
8
+ 2. Click **I'm running late** in the examples.
9
+ 3. Show the haunted railway rewrite, sendability meter, and chaos meter.
10
+ 4. Open **Behind the rewrite** and flash the agent trace for one second.
11
+ 5. Enter `Please bring snacks too` in **Continue in the same voice**.
12
+ 6. Click **Generate genre voice** and play one short VoxCPM2 line if it is warm.
13
+ 7. Switch to **Anime Power-Up Speech**, intensity 5, with `Party at my place tonight`.
14
+ 8. End on the final output and the badges: MiniCPM, VoxCPM2, Modal, Codex.
15
+
16
+ ## Voiceover
17
+
18
+ **0-4s**
19
+ I built GenreGoblin: a tiny-model machine for making normal texts dramatically unemployable.
20
+
21
+ **4-10s**
22
+ One tap turns "I'm running late" into public transit with unresolved emotional baggage.
23
+
24
+ **10-17s**
25
+ MiniCPM drafts the rewrite, the agent checks meaning and sendability, and then it adds tasteful nonsense.
26
+
27
+ **17-24s**
28
+ It remembers the voice too, because every group chat deserves continuity and mild consequences.
29
+
30
+ **24-32s**
31
+ VoxCPM2 reads the result in a genre-matched voice, hosted on Modal for when browser speech is not theatrical enough.
32
+
33
+ **32-40s**
34
+ And when subtlety fails, there is anime mode. MiniCPM3-4B, VoxCPM2, Gradio, Modal, and Codex.
35
+
36
+ **40-45s**
37
+ Plain text goes in. Theater comes out.
38
+
39
+ ## Backup If Voice Is Cold
40
+
41
+ Say: "The studio voice takes a moment to warm up, so the instant preview keeps the demo moving."
42
+ Then click **Instant preview** instead of waiting.
app.py CHANGED
@@ -227,10 +227,19 @@ HARMFUL_PATTERNS = [
227
  r"\bsexual\b.*\b(?:minor|child|underage)\b",
228
  ]
229
 
 
 
 
 
 
 
 
 
230
 
231
  SYSTEM_PROMPT = """You are GenreGoblin, an elite comedy rewriter using a compact model.
232
  Rewrite the plain message in the requested genre. Preserve the exact practical meaning.
233
  Do not add threats, abuse, invented facts, promises, or new requests. Keep it copyable.
 
234
  The humor must come from the genre's logic, not random adjectives, generic hype, or references
235
  to being an AI. Use one vivid, specific comic image and a strong final beat. Intensity 1 is
236
  subtle; 5 is absurd but clear. Return only one valid JSON object with exactly two string keys:
@@ -851,6 +860,8 @@ Comedy engine: {comedy_engine}
851
  Avoid these words: {", ".join(profile.forbidden_words)}
852
  Recent style examples: {memory_text}
853
  Meaning words that must remain explicit: {required_words}
 
 
854
 
855
  Safe full draft to polish: {safe_draft}
856
  Safe short draft to polish: {safe_short}
@@ -1011,10 +1022,15 @@ def _model_output_is_usable(
1011
  ) -> bool:
1012
  output = result.final_message.lower()
1013
  short = result.short_version.lower()
 
1014
  if len(output) < 4 or len(output) > 2800:
1015
  return False
1016
  if short in {"a shorter rewrite", "shorter rewrite", "short version"}:
1017
  return False
 
 
 
 
1018
  source_words = {
1019
  word
1020
  for word in re.findall(r"[a-z]{3,}", message.lower())
 
227
  r"\bsexual\b.*\b(?:minor|child|underage)\b",
228
  ]
229
 
230
+ INVENTED_ENTITY_PATTERNS = [
231
+ r"\bxyz(?:\s+corporation)?\b",
232
+ r"\beloria\b",
233
+ r"\btown square\b",
234
+ r"\b(?:kingdom|realm|city|village|station|corporation|company|council|guild|order)\s+of\s+[a-z][a-z'-]{2,}\b",
235
+ r"\b[a-z][a-z'-]{2,}\s+(?:corporation|corp|inc|llc|ltd|kingdom|realm|city|village|station|council|guild)\b",
236
+ ]
237
+
238
 
239
  SYSTEM_PROMPT = """You are GenreGoblin, an elite comedy rewriter using a compact model.
240
  Rewrite the plain message in the requested genre. Preserve the exact practical meaning.
241
  Do not add threats, abuse, invented facts, promises, or new requests. Keep it copyable.
242
+ Do not invent named companies, kingdoms, cities, stations, organizations, people, dates, or places.
243
  The humor must come from the genre's logic, not random adjectives, generic hype, or references
244
  to being an AI. Use one vivid, specific comic image and a strong final beat. Intensity 1 is
245
  subtle; 5 is absurd but clear. Return only one valid JSON object with exactly two string keys:
 
860
  Avoid these words: {", ".join(profile.forbidden_words)}
861
  Recent style examples: {memory_text}
862
  Meaning words that must remain explicit: {required_words}
863
+ Grounding rule: do not add named companies, kingdoms, cities, stations, organizations, people,
864
+ dates, or places unless they appear in the plain message.
865
 
866
  Safe full draft to polish: {safe_draft}
867
  Safe short draft to polish: {safe_short}
 
1022
  ) -> bool:
1023
  output = result.final_message.lower()
1024
  short = result.short_version.lower()
1025
+ source = message.lower()
1026
  if len(output) < 4 or len(output) > 2800:
1027
  return False
1028
  if short in {"a shorter rewrite", "shorter rewrite", "short version"}:
1029
  return False
1030
+ for pattern in INVENTED_ENTITY_PATTERNS:
1031
+ for match in re.finditer(pattern, output):
1032
+ if match.group(0) not in source:
1033
+ return False
1034
  source_words = {
1035
  word
1036
  for word in re.findall(r"[a-z]{3,}", message.lower())