Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -131,14 +131,14 @@ def test_error( images, x_mask):
|
|
131 |
|
132 |
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
['
|
137 |
-
['
|
138 |
-
['
|
139 |
-
['
|
140 |
-
['
|
141 |
-
]
|
142 |
|
143 |
|
144 |
|
@@ -155,7 +155,12 @@ article = "<p style='text-align: center'></p>"
|
|
155 |
css = "#0 {object-fit: contain;} #1 {object-fit: contain;}"
|
156 |
inputs = gr.inputs.Image(label="Input Image")
|
157 |
|
158 |
-
demo = gr.Interface(fn=recognize_text,
|
|
|
|
|
|
|
|
|
|
|
159 |
description=description,
|
160 |
article=article,allow_flagging='never')
|
161 |
|
|
|
131 |
|
132 |
|
133 |
|
134 |
+
examples = [
|
135 |
+
['sample_test_images/59-11.png'],
|
136 |
+
['sample_test_images/59-21.png'],
|
137 |
+
['sample_test_images/59-32.png'],
|
138 |
+
['sample_test_images/59-37.png'],
|
139 |
+
['sample_test_images/91-47.png'],
|
140 |
+
['sample_test_images/91-49.png'],
|
141 |
+
]
|
142 |
|
143 |
|
144 |
|
|
|
155 |
css = "#0 {object-fit: contain;} #1 {object-fit: contain;}"
|
156 |
inputs = gr.inputs.Image(label="Input Image")
|
157 |
|
158 |
+
demo = gr.Interface(fn=recognize_text,
|
159 |
+
inputs=inputs,
|
160 |
+
outputs=[gr.Textbox(label="Output"),
|
161 |
+
gr.Image(label="Attended Regions")],
|
162 |
+
examples=examples,
|
163 |
+
title=title,
|
164 |
description=description,
|
165 |
article=article,allow_flagging='never')
|
166 |
|