Spaces:
Runtime error
Runtime error
Commit ·
94302df
1
Parent(s): f6ec5e1
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,16 +6,16 @@ import os
|
|
| 6 |
os.system("pip install -r requirements.txt")
|
| 7 |
|
| 8 |
def OCR_processor(input_image):
|
| 9 |
-
input_image = Image.open(input_image)
|
| 10 |
return processor(input_image)
|
| 11 |
|
| 12 |
iface = gr.Interface(
|
| 13 |
fn=OCR_processor,
|
| 14 |
-
inputs=gr.inputs.Image(type="
|
| 15 |
outputs=gr.outputs.Image(type="pil", label="Processed Image"),
|
| 16 |
title="OCR Image Processor",
|
| 17 |
description="Upload an image, and the app will process it using OCR_processor() function.",
|
| 18 |
-
theme="
|
| 19 |
layout="vertical",
|
| 20 |
live=True,
|
| 21 |
)
|
|
|
|
| 6 |
os.system("pip install -r requirements.txt")
|
| 7 |
|
| 8 |
def OCR_processor(input_image):
|
| 9 |
+
#input_image = Image.open(input_image)
|
| 10 |
return processor(input_image)
|
| 11 |
|
| 12 |
iface = gr.Interface(
|
| 13 |
fn=OCR_processor,
|
| 14 |
+
inputs=gr.inputs.Image(type="filepath", label="Upload an Image"),
|
| 15 |
outputs=gr.outputs.Image(type="pil", label="Processed Image"),
|
| 16 |
title="OCR Image Processor",
|
| 17 |
description="Upload an image, and the app will process it using OCR_processor() function.",
|
| 18 |
+
theme="huggingface", # You can use "default", "compact", or "huggingface" themes
|
| 19 |
layout="vertical",
|
| 20 |
live=True,
|
| 21 |
)
|