EasyOCR / app.py
anjali2002's picture
Add application file
452de0e
raw
history blame contribute delete
362 Bytes
import gradio as gr
from model import EasyOCRModel
model = EasyOCRModel()
def ocr_image(image):
return model.predict(image.name)
interface = gr.Interface(
fn=ocr_image,
inputs="image",
outputs="text",
title="EasyOCR API",
description="Upload an image to extract text using EasyOCR."
)
if __name__ == "__main__":
interface.launch()