UNPKG

teachable-machine.js

Version:

A robust and optimized JavaScript library for integrating Google's Teachable Machine models, supporting various image sources and providing efficient classification capabilities.

10 lines (8 loc) 296 B
import got from 'got'; export const http = got.extend({ timeout: { request: 15000 }, retry: { limit: 2, methods: ['GET', 'HEAD'], statusCodes: [408, 413, 429, 500, 502, 503, 504] }, headers: { 'user-agent': 'tmjs/1.0 (+https://github.com/nixaut-codelabs/teachable-machine.js)' } });