UNPKG

@huggingface/inference

Version:

Typescript client for the Hugging Face Inference Providers and Inference Endpoints

4 lines (3 loc) 268 B
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; const isWebWorker = typeof self === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope"; export const isBackend = !isBrowser && !isWebWorker;