Use Transformers.js from Blazor WebAssembly to run pretrained models with the ONNX Runtime in the browser.
$ dotnet add package SpawnDev.BlazorJS.TransformersJSSpawnDev.BlazorJS.TrasnformersJS brings the awesome Transformers.js library from Hugging Face to Blazor WebAssembly.
Transformers.js is designed to be functionally equivalent to Hugging Face’s transformers python library, meaning you can run the same pretrained models using a very similar API. These models support common tasks in different modalities, such as:
Transformers.js uses ONNX Runtime to run models in the browser. The best part about it, is that you can easily convert your pretrained PyTorch, TensorFlow, or JAX models to ONNX using 🤗 Optimum.
The current demo app uses Transformers.js, Blazor, and WebGL.
NOTE: The models used can be large. A fast connection is recommended.
If you are interested in this project, please start an issue to suggest features or areas of interest.