gaurav2004
commited on
Commit
•
d5c405e
1
Parent(s):
1c101c7
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,12 @@ import pytesseract
|
|
5 |
import gradio as gr
|
6 |
|
7 |
|
8 |
-
|
9 |
|
10 |
# Function to extract text and search for a keyword
|
11 |
def ocr_with_search(image, keyword):
|
12 |
# Extract text using OCR (supports Hindi and English)
|
|
|
13 |
|
14 |
text = pytesseract.image_to_string(image, lang='hin+eng')
|
15 |
|
|
|
5 |
import gradio as gr
|
6 |
|
7 |
|
8 |
+
|
9 |
|
10 |
# Function to extract text and search for a keyword
|
11 |
def ocr_with_search(image, keyword):
|
12 |
# Extract text using OCR (supports Hindi and English)
|
13 |
+
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
|
14 |
|
15 |
text = pytesseract.image_to_string(image, lang='hin+eng')
|
16 |
|