Skip to content

Commit

Permalink
Enable syntax highlighting in workers_vs_schedulers.md (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnwst committed Nov 19, 2023
1 parent c01ca0a commit 4970cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/workers_vs_schedulers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tesseract.js offers 2 ways to run recognition jobs: (1) using a worker directly,
# Option 1: Using Workers Directly
The following snippet recognizes text from an image using a single worker.

```
```javascript
(async () => {
const worker = await Tesseract.createWorker('eng');
const { data: { text } } = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png');
Expand All @@ -22,7 +22,7 @@ In actual use, the `createWorker` step should be separated from the `worker.reco
# Option 2: Using Schedulers + Workers
Tesseract.js also supports executing jobs using schedulers. A scheduler is an object that contains multiple workers, which it uses to execute jobs in parallel. For example, the following code executes 10 jobs in parallel using 4 workers.

```
```javascript
const scheduler = Tesseract.createScheduler();

// Creates worker and adds to scheduler
Expand Down

0 comments on commit 4970cea

Please sign in to comment.