Dileep7729 commited on
Commit
a9eefb1
·
verified ·
1 Parent(s): 4e7600d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,13 +1,14 @@
1
  import gradio as gr
2
  import torch
3
  from transformers import LayoutLMv3Processor, LayoutLMv3ForTokenClassification
4
- import pytesseract
5
-
6
- import pytesseract
7
 
8
  # Explicitly set the Tesseract path
9
  # For Hugging Face Spaces, set this to the default Linux path
10
- pytesseract.pytesseract.tesseract_cmd = "/usr/bin/tesseract"
 
 
 
 
11
 
12
  # For local development on Windows
13
  # Uncomment the line below if running locally on Windows
 
1
  import gradio as gr
2
  import torch
3
  from transformers import LayoutLMv3Processor, LayoutLMv3ForTokenClassification
 
 
 
4
 
5
  # Explicitly set the Tesseract path
6
  # For Hugging Face Spaces, set this to the default Linux path
7
+ import pytesseract
8
+
9
+ # Set the Tesseract executable path explicitly
10
+ pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
11
+
12
 
13
  # For local development on Windows
14
  # Uncomment the line below if running locally on Windows