Transformers.js
  • 🌍Transformers.js
  • 🌍GET STARTED
    • Installation
    • The pipeline API
    • Custom usage
  • 🌍TUTORIALS
    • Building a Vanilla JS Application
    • Building a React Application
    • Building a Next.js Application
    • Building a Browser Extension
    • Building an Electron Application
    • Server-side Inference in Node.js
  • 🌍DEVELOPER GUIDES
    • Accessing Private/Gated Models
    • Server-side Audio Processing in Node.js
  • 🌍API REFERENCE
    • Index
    • Pipelines
    • Models
    • Tokenizers
    • Processors
    • Configs
    • Environment variables
    • 🌍BACKENDS
      • ONNX
    • 🌍UTILITIES
      • Core
      • Hub
      • Image
      • Audio
      • Tensor
      • Maths
      • Generation
      • Data Structures
Powered by GitBook
On this page
  1. 🌍GET STARTED

Installation

Installation

To install via NPM, run:

Copied

npm i @xenova/transformers

Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using ES Modules, you can import the library with:

Copied

<script type="module">
    import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.7.0';
</script>
PreviousGET STARTEDNextThe pipeline API

Last updated 1 year ago