Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
kenken999
/
fastapi_django_main_live
like
6
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
2456270
fastapi_django_main_live
/
contbk
/
ai
/
polls
/
ocr.py
kenken999
m
e2444ac
7 days ago
raw
Copy download link
history
blame
Safe
172 Bytes
import
pytesseract
from
PIL
import
Image
def
ocr_extract_text
(
image_path
):
image = Image.
open
(image_path)
text = pytesseract.image_to_string(image)
return
text