Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
kenken999
/
fastapi_django_main_live
like
6
Running
on
Zero
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
d61a99c
fastapi_django_main_live
/
contbk
/
ai
/
polls
/
ocr.py
kenken999
m
e2444ac
8 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