Socket
Socket
Sign inDemoInstall

@xenova/transformers

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xenova/transformers - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@xenova/transformers",
"version": "1.0.2",
"version": "1.0.3",
"description": "Run 🤗 Transformers in your browser! We currently support BERT, DistilBERT, T5, GPT2, and BART models, for a variety of tasks including: masked language modelling, text classification, translation, summarization, question answering, and text generation.",

@@ -5,0 +5,0 @@ "main": "./src/transformers.js",

const fs = require('fs');
const path = require('path');
// Use caching when available
const CACHE_AVAILABLE = typeof self !== 'undefined' && 'caches' in self;
const FS_AVAILABLE = !isEmpty(fs); // check if file system is available

@@ -118,3 +118,3 @@ class FileResponse {

if (fs && !isValidHttpUrl(url)) {
if (FS_AVAILABLE && !isValidHttpUrl(url)) {
return new FileResponse(url)

@@ -131,2 +131,6 @@

function isEmpty(obj) {
return Object.keys(obj).length === 0;
}
async function getModelFile(modelPath, fileName, progressCallback = null) {

@@ -133,0 +137,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc