Spaces:
Runtime error
Runtime error
Download sdk-js/examples/basic.ts from horribleProgram/IntentAPI: direct link, hf CLI and curl.
- Browser
- Download file 247 Bytes
-
https://huggingface.co/spaces/horribleProgram/IntentAPI/resolve/ecb29bf811da58b9a0bb2e88f6134320c01f0e3f/sdk-js/examples/basic.ts
- Command line
-
hf download hf://spaces/horribleProgram/IntentAPI@ecb29bf811da58b9a0bb2e88f6134320c01f0e3f/sdk-js/examples/basic.ts
-
curl -L -o basic.ts https://huggingface.co/spaces/horribleProgram/IntentAPI/resolve/ecb29bf811da58b9a0bb2e88f6134320c01f0e3f/sdk-js/examples/basic.ts
247 Bytes
| import { query_intent } from "../src/index.ts"; | |
| const result = await query_intent("I have food to share"); | |
| console.log(`Domain: ${result.domain}`); | |
| console.log(`Intent: ${result.intent}`); | |
| console.log(`Confidence: ${result.confidence}`); | |