Spaces:
Sleeping
Sleeping
Chanegs
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def ocr_image(image):
|
|
| 24 |
|
| 25 |
# Create a Gradio interface
|
| 26 |
interface = gr.Interface(fn=ocr_image, # Function to be called when an image is uploaded
|
| 27 |
-
inputs=gr.
|
| 28 |
outputs="text", # Output is extracted text
|
| 29 |
title="OCR Inference", # Title of the app
|
| 30 |
description="Upload an image with handwritten text to extract the text.") # Description
|
|
|
|
| 24 |
|
| 25 |
# Create a Gradio interface
|
| 26 |
interface = gr.Interface(fn=ocr_image, # Function to be called when an image is uploaded
|
| 27 |
+
inputs=gr.Image(type="pil"), # Input is an image file (Gradio v3+ API)
|
| 28 |
outputs="text", # Output is extracted text
|
| 29 |
title="OCR Inference", # Title of the app
|
| 30 |
description="Upload an image with handwritten text to extract the text.") # Description
|