From ab3c16fe3be13d6ad64fb064783c13ffc8d84fde Mon Sep 17 00:00:00 2001
From: Joshua Lochner <26504141+xenova@users.noreply.github.com>
Date: Wed, 16 Apr 2025 11:37:54 -0400
Subject: [PATCH 1/2] Fix "DeprecationWarning: 'count' is passed as positional
argument"
---
docs/scripts/build_readme.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/scripts/build_readme.py b/docs/scripts/build_readme.py
index 2b88f1421..20379855e 100644
--- a/docs/scripts/build_readme.py
+++ b/docs/scripts/build_readme.py
@@ -106,7 +106,7 @@ def replace_fn(match):
return f'({link})'
result = README_TEMPLATE.format(**file_data)
- result = re.sub(LINK_RE, replace_fn, result, 0, re.MULTILINE)
+ result = re.sub(LINK_RE, replace_fn, result, count=0, flags=re.MULTILINE)
with open('README.md', 'w', encoding='utf-8') as f:
f.write(result)
From 3fc74a0602aec66b0acfda7d710ad5e1dc9cdfd4 Mon Sep 17 00:00:00 2001
From: Joshua Lochner <26504141+xenova@users.noreply.github.com>
Date: Wed, 16 Apr 2025 11:38:41 -0400
Subject: [PATCH 2/2] [version] Update to 3.5.0
---
README.md | 4 ++--
docs/snippets/2_installation.snippet | 2 +-
docs/snippets/4_custom-usage.snippet | 2 +-
package-lock.json | 4 ++--
package.json | 2 +-
src/env.js | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index f333b8433..d3003d3c4 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ npm i @huggingface/transformers
Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with:
```html
```
@@ -155,7 +155,7 @@ Check out the Transformers.js [template](https://huggingface.co/new-space?templa
-By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.4.2/dist/), which should work out-of-the-box. You can customize this as follows:
+By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.5.0/dist/), which should work out-of-the-box. You can customize this as follows:
### Settings
diff --git a/docs/snippets/2_installation.snippet b/docs/snippets/2_installation.snippet
index d2b105e35..985a372f3 100644
--- a/docs/snippets/2_installation.snippet
+++ b/docs/snippets/2_installation.snippet
@@ -7,6 +7,6 @@ npm i @huggingface/transformers
Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with:
```html
```
diff --git a/docs/snippets/4_custom-usage.snippet b/docs/snippets/4_custom-usage.snippet
index 5b038d57d..554b6ec0c 100644
--- a/docs/snippets/4_custom-usage.snippet
+++ b/docs/snippets/4_custom-usage.snippet
@@ -1,6 +1,6 @@
-By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.4.2/dist/), which should work out-of-the-box. You can customize this as follows:
+By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.5.0/dist/), which should work out-of-the-box. You can customize this as follows:
### Settings
diff --git a/package-lock.json b/package-lock.json
index 75bbf1d0e..9dbad1e69 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@huggingface/transformers",
- "version": "3.4.2",
+ "version": "3.5.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@huggingface/transformers",
- "version": "3.4.2",
+ "version": "3.5.0",
"license": "Apache-2.0",
"dependencies": {
"@huggingface/jinja": "^0.3.4",
diff --git a/package.json b/package.json
index 805ffbdb9..f5f881fa0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@huggingface/transformers",
- "version": "3.4.2",
+ "version": "3.5.0",
"description": "State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!",
"main": "./src/transformers.js",
"types": "./types/transformers.d.ts",
diff --git a/src/env.js b/src/env.js
index 958178474..d591a8ab6 100644
--- a/src/env.js
+++ b/src/env.js
@@ -26,7 +26,7 @@ import fs from 'fs';
import path from 'path';
import url from 'url';
-const VERSION = '3.4.2';
+const VERSION = '3.5.0';
// Check if various APIs are available (depends on environment)
const IS_BROWSER_ENV = typeof window !== "undefined" && typeof window.document !== "undefined";