Spaces:
Running
Running
Download src/detection/workerMessages.ts from apssouza22/webgpu-cluster: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/apssouza22/webgpu-cluster/resolve/main/src/detection/workerMessages.ts
- Command line
-
hf download hf://spaces/apssouza22/webgpu-cluster/src/detection/workerMessages.ts
-
curl -L -o workerMessages.ts https://huggingface.co/spaces/apssouza22/webgpu-cluster/resolve/main/src/detection/workerMessages.ts
457 Bytes
| import type {ObjectDetectionOutput} from '@huggingface/transformers'; | |
| export type DetectionResult = ObjectDetectionOutput[number]; | |
| export type WorkerRequest = | |
| | {type: 'init'} | |
| | {type: 'detect'; id: number; threshold: number; frame: VideoFrame}; | |
| export type WorkerResponse = | |
| | {type: 'status'; message: string} | |
| | {type: 'ready'} | |
| | {type: 'detect-result'; id: number; results: DetectionResult[]} | |
| | {type: 'error'; error: string; id?: number}; | |