Spaces:
Sleeping
Sleeping
Download api/utils.ts from PITTI/speechmap-judges: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/PITTI/speechmap-judges/resolve/main/api/utils.ts
- Command line
-
hf download hf://spaces/PITTI/speechmap-judges/api/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/PITTI/speechmap-judges/resolve/main/api/utils.ts
332 Bytes
| import type { ServerResponse } from 'http'; | |
| export function jsonResponse(res: ServerResponse, statusCode: number, data: any) { | |
| res.statusCode = statusCode; | |
| res.setHeader('Content-Type', 'application/json'); | |
| res.end(JSON.stringify(data)); | |
| } | |
| export const ALLOWED_CLASSIFICATIONS = new Set(['compliance', 'pitti_compliance']); | |