Skip to content

Commit 2b02aec

Browse files
authored
Fix broken source code links in the Tutorials sections. (#1526)
* fix vanilla js page * update electron page * update browser extension * fix typo
1 parent a1c658a commit 2b02aec

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Building a browser extension
22

3-
_Full tutorial coming soon..._ In the meantime, check out the example application: https://github.com/huggingface/transformers.js/tree/main/examples/extension
3+
_Full tutorial coming soon..._ In the meantime, check out the example application: https://github.com/huggingface/transformers.js-examples/tree/main/browser-extension
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Building an Electron application
22

3-
_Full tutorial coming soon..._ In the meantime, check out the example application: https://github.com/huggingface/transformers.js/tree/main/examples/electron
3+
_Full tutorial coming soon..._ In the meantime, check out the example application: https://github.com/huggingface/transformers.js-examples/tree/main/electron

packages/transformers/docs/source/tutorials/react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For this application, we will use the [Xenova/nllb-200-distilled-600M](https://h
5555

5656
We can achieve both of these goals by using a [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) and some [React hooks](https://react.dev/reference/react).
5757

58-
1. Create a file called `worker.js` in the `src` directory. This script will do all the heavy-lifing for us, including loading and running of the translation pipeline. To ensure the model is only loaded once, we will create the `MyTranslationPipeline` class which use the [singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern) to lazily create a single instance of the pipeline when `getInstance` is first called, and use this pipeline for all subsequent calls:
58+
1. Create a file called `worker.js` in the `src` directory. This script will do all the heavy-lifting for us, including loading and running of the translation pipeline. To ensure the model is only loaded once, we will create the `MyTranslationPipeline` class which use the [singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern) to lazily create a single instance of the pipeline when `getInstance` is first called, and use this pipeline for all subsequent calls:
5959

6060
```javascript
6161
import { pipeline, TextStreamer } from "@huggingface/transformers";

packages/transformers/docs/source/tutorials/vanilla-js.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Here's how it works: the user clicks “Upload image” and selects an image usi
99
Useful links:
1010

1111
- [Demo site](https://huggingface.co/spaces/Scrimba/vanilla-js-object-detector)
12-
- [Interactive code walk-through (scrim)](https://scrimba.com/scrim/cKm9bDAg)
13-
- [Source code](https://github.com/huggingface/transformers.js/tree/main/examples/vanilla-js)
12+
- [Source code](https://github.com/huggingface/transformers.js-examples/tree/main/vanilla-js)
1413

1514
## Step 1: HTML and CSS setup
1615

@@ -296,7 +295,7 @@ The bounding box and label span also need some styling, so add the following to
296295

297296
**And that’s it!**
298297

299-
You've now built your own fully-functional AI application that detects objects in images, which runns completely in your browser: no external server, APIs, or build tools. Pretty cool! 🥳
298+
You've now built your own fully-functional AI application that detects objects in images, which runs completely in your browser: no external server, APIs, or build tools. Pretty cool! 🥳
300299

301300
![Demo](https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/js-detection-inference-elephant.png)
302301

0 commit comments

Comments
 (0)