ilar06 commited on
Commit
45d4211
·
verified ·
1 Parent(s): 3c0a499

Update Tesseract.js

Browse files
Files changed (1) hide show
  1. Tesseract.js +2 -2
Tesseract.js CHANGED
@@ -1,4 +1,4 @@
1
- import streamlit as st
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;