Spaces:
Running
Running
Download src/utils/coco-examples.ts from BryanBradfo/Gemma4-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/BryanBradfo/Gemma4-WebGPU/resolve/main/src/utils/coco-examples.ts
- Command line
-
hf download hf://spaces/BryanBradfo/Gemma4-WebGPU/src/utils/coco-examples.ts
-
curl -L -o coco-examples.ts https://huggingface.co/spaces/BryanBradfo/Gemma4-WebGPU/resolve/main/src/utils/coco-examples.ts
1.19 kB
| export interface CocoExample { | |
| url: string; | |
| prompt: string; | |
| label: string; | |
| } | |
| export const DEFAULT_DETECTION_PROMPT = | |
| 'Detect all objects in this image. Return each detection as JSON: [{"box_2d": [y1, x1, y2, x2], "label": "object_name"}]'; | |
| const DETECT_PROMPT = DEFAULT_DETECTION_PROMPT; | |
| const DESCRIBE_PROMPT = | |
| "Describe this image in detail. What objects, people, and activities do you see?"; | |
| // Verified existing images in the Xenova/transformers.js-docs dataset (CORS enabled, stable) | |
| const BASE = "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main"; | |
| export const COCO_EXAMPLES: CocoExample[] = [ | |
| { | |
| url: `${BASE}/cats.jpg`, | |
| prompt: DETECT_PROMPT, | |
| label: "Cats", | |
| }, | |
| { | |
| url: `${BASE}/city-streets.jpg`, | |
| prompt: DETECT_PROMPT, | |
| label: "Streets", | |
| }, | |
| { | |
| url: `${BASE}/corgi.jpg`, | |
| prompt: DETECT_PROMPT, | |
| label: "Corgi", | |
| }, | |
| { | |
| url: `${BASE}/football-match.jpg`, | |
| prompt: DETECT_PROMPT, | |
| label: "Football", | |
| }, | |
| { | |
| url: `${BASE}/airport.jpg`, | |
| prompt: DETECT_PROMPT, | |
| label: "Airport", | |
| }, | |
| { | |
| url: `${BASE}/butterfly.jpg`, | |
| prompt: DESCRIBE_PROMPT, | |
| label: "Butterfly", | |
| }, | |
| ]; | |