Spaces:
Build error
Build error
Commit
·
3eaa6dc
1
Parent(s):
b7f1f18
Upload app.py
Browse files
app.py
CHANGED
|
@@ -15,13 +15,13 @@ def read_img(image):
|
|
| 15 |
# Run the model
|
| 16 |
result = predictor(doc)
|
| 17 |
# Return the result
|
| 18 |
-
return result, result.show(doc)
|
| 19 |
|
| 20 |
app = gr.Interface(
|
| 21 |
title="Image OCR",
|
| 22 |
description="Extract text from images",
|
| 23 |
inputs=gr.Image(type="pil"),
|
| 24 |
-
outputs=[gr.Textbox(), gr.Image(
|
| 25 |
fn=read_img
|
| 26 |
)
|
| 27 |
|
|
|
|
| 15 |
# Run the model
|
| 16 |
result = predictor(doc)
|
| 17 |
# Return the result
|
| 18 |
+
return result.render(), result.show(doc)
|
| 19 |
|
| 20 |
app = gr.Interface(
|
| 21 |
title="Image OCR",
|
| 22 |
description="Extract text from images",
|
| 23 |
inputs=gr.Image(type="pil"),
|
| 24 |
+
outputs=[gr.Textbox(), gr.Image()],
|
| 25 |
fn=read_img
|
| 26 |
)
|
| 27 |
|