Spaces:
Running
Running
update version
Browse files
app.py
CHANGED
|
@@ -1012,7 +1012,7 @@ Requirements:
|
|
| 1012 |
|
| 1013 |
Library import (required): Add the following snippet to index.html to import transformers.js:
|
| 1014 |
<script type="module">
|
| 1015 |
-
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].
|
| 1016 |
</script>
|
| 1017 |
|
| 1018 |
Device Options: By default, transformers.js runs on CPU (via WASM). For better performance, you can run models on GPU using WebGPU:
|
|
@@ -1153,7 +1153,7 @@ Requirements:
|
|
| 1153 |
|
| 1154 |
Library import (required): Add the following snippet to index.html to import transformers.js:
|
| 1155 |
<script type="module">
|
| 1156 |
-
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].
|
| 1157 |
</script>
|
| 1158 |
|
| 1159 |
Device Options: By default, transformers.js runs on CPU (via WASM). For better performance, you can run models on GPU using WebGPU:
|
|
@@ -2104,7 +2104,7 @@ def build_transformers_inline_html(files: dict) -> str:
|
|
| 2104 |
css = files.get('style.css') or ''
|
| 2105 |
|
| 2106 |
# Normalize JS imports to CDN (handle both @huggingface/transformers and legacy @xenova/transformers)
|
| 2107 |
-
cdn_url = "https://cdn.jsdelivr.net/npm/@huggingface/[email protected].
|
| 2108 |
|
| 2109 |
def _normalize_imports(_code: str) -> str:
|
| 2110 |
if not _code:
|
|
|
|
| 1012 |
|
| 1013 |
Library import (required): Add the following snippet to index.html to import transformers.js:
|
| 1014 |
<script type="module">
|
| 1015 |
+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].3';
|
| 1016 |
</script>
|
| 1017 |
|
| 1018 |
Device Options: By default, transformers.js runs on CPU (via WASM). For better performance, you can run models on GPU using WebGPU:
|
|
|
|
| 1153 |
|
| 1154 |
Library import (required): Add the following snippet to index.html to import transformers.js:
|
| 1155 |
<script type="module">
|
| 1156 |
+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].3';
|
| 1157 |
</script>
|
| 1158 |
|
| 1159 |
Device Options: By default, transformers.js runs on CPU (via WASM). For better performance, you can run models on GPU using WebGPU:
|
|
|
|
| 2104 |
css = files.get('style.css') or ''
|
| 2105 |
|
| 2106 |
# Normalize JS imports to CDN (handle both @huggingface/transformers and legacy @xenova/transformers)
|
| 2107 |
+
cdn_url = "https://cdn.jsdelivr.net/npm/@huggingface/[email protected].3"
|
| 2108 |
|
| 2109 |
def _normalize_imports(_code: str) -> str:
|
| 2110 |
if not _code:
|