Dileep7729 commited on
Commit
eaf0c22
·
verified ·
1 Parent(s): b2f9537

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -2,6 +2,11 @@ from PIL import Image
2
  from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor
3
  import gradio as gr
4
  import torch
 
 
 
 
 
5
 
6
  # Load the fine-tuned model and processor from local files
7
  model_path = "./" # Path to the directory containing the uploaded model files
 
2
  from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor
3
  import gradio as gr
4
  import torch
5
+ import pytesseract
6
+
7
+ # Set the path to the Tesseract executable
8
+ pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" # Replace with your actual Tesseract path
9
+
10
 
11
  # Load the fine-tuned model and processor from local files
12
  model_path = "./" # Path to the directory containing the uploaded model files