Spaces:
Sleeping
Sleeping
Update Tesseract.js
Browse files- Tesseract.js +2 -2
Tesseract.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import
|
2 |
|
3 |
const video = document.getElementById('video');
|
4 |
const canvas = document.getElementById('canvas');
|
@@ -14,7 +14,7 @@ import streamlit as st
|
|
14 |
console.error("Error accessing the camera: ", err);
|
15 |
});
|
16 |
|
17 |
-
captureButton.addEventListener('click', () => {
|
18 |
// Draw the video frame to the canvas
|
19 |
canvas.width = video.videoWidth;
|
20 |
canvas.height = video.videoHeight;
|
|
|
1 |
+
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
2 |
|
3 |
const video = document.getElementById('video');
|
4 |
const canvas = document.getElementById('canvas');
|
|
|
14 |
console.error("Error accessing the camera: ", err);
|
15 |
});
|
16 |
|
17 |
+
captureButton.addEventListener('click', (canvas) => {
|
18 |
// Draw the video frame to the canvas
|
19 |
canvas.width = video.videoWidth;
|
20 |
canvas.height = video.videoHeight;
|