169c9db
1
2
3
4
5
6
7
8
import pytesseract import cv2 def extract_text_from_image(image_path): img = cv2.imread(image_path) text = pytesseract.image_to_string(img) return text.strip()