-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Wondering how to import transformers.js as a module (as opposed to <script>) in the browser? I've tried this:
let { AutoTokenizer } = await import("https://cdn.jsdelivr.net/npm/@xenova/transformers@1.4.2/dist/transformers.min.js");But it doesn't seem to export anything. I might be making a mistake here, but if not: Woudl it be possible to get a module-based js file for the browser?
Also, as an aside, can I suggest using a versioned URL in the readme? Or something like:
https://cdn.jsdelivr.net/npm/@xenova/transformers@X.Y.Z/dist/transformers.min.js
With a note telling them to replace X.Y.Z with the latest version. This allows you to make breaking changes in the future without breaking a bunch of sites. Often newbie devs don't realise that they have to swap for a versioned URL, and this can lead to "web rot" where old webpages eventuallly become broken or buggy.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested