Spaces:
Runtime error
Runtime error
File size: 362 Bytes
452de0e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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() |