Diego-0121 commited on
Commit
a3a4a35
·
1 Parent(s): 5b09006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -4,7 +4,6 @@ import gradio as gr
4
 
5
  # ------------------------- Function to extract text from an image -------------------------
6
  def extract_text_from_image(image):
7
- pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
8
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Convert the image from BGR to grayscale
9
  text = pytesseract.image_to_string(gray) # Extract text from the grayscale image
10
  return text
 
4
 
5
  # ------------------------- Function to extract text from an image -------------------------
6
  def extract_text_from_image(image):
 
7
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Convert the image from BGR to grayscale
8
  text = pytesseract.image_to_string(gray) # Extract text from the grayscale image
9
  return text