1.2 KiB
1.2 KiB
Примеры интеграции
Подробности — в docs/integration.md.
| Каталог | Язык | Путь | Что делает |
|---|---|---|---|
typescript/predict.mjs |
Node.js >= 18 | HTTP | CLI-клиент сервиса: --text / --html, без зависимостей |
typescript/predict.ts |
TypeScript | HTTP | то же с типами (npx tsx predict.ts --text "...") |
typescript/onnx_local.mjs |
Node.js | ONNX | локальный инференс без Python (onnxruntime-node + @huggingface/transformers) |
powershell/predict.ps1 |
PowerShell 5.1/7 | HTTP | -Text "..." / -HtmlFile страница.html (кириллица и кодировки учтены) |
rust/http_client |
Rust | HTTP | cargo run -- --text "..." / --html файл (reqwest + tokio) |
rust/onnx_local |
Rust | ONNX | локальный инференс (ort + tokenizers) |
Перед путём А запустите сервис:
python -m src.service --model models/best --port 8000
Перед путём Б экспортируйте модель:
python -m src.export_onnx # -> models/best-onnx