Spaces:
Sleeping
Sleeping
File size: 751 Bytes
e3e0609 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import pytesseract
from PIL import Image
import gradio as gr
# Definindo a função de OCR
def extract_text_from_image(image):
text = pytesseract.image_to_string(image)
return text
# Criando a interface do Gradio
iface = gr.Interface(
fn=extract_text_from_image,
inputs="image",
outputs="text",
title="OCR-img2txt",
description="This application uses Optical Character Recognition (OCR) technology to extract text from images. It employs the Tesseract OCR engine to process images containing printed text, converting it into editable and searchable text. Ideal for digitizing documents, extracting text from photos, and converting scanned images into text formats."
)
# Executando a interface
iface.launch(debug=True)
|