Commit
·
158eea8
1
Parent(s):
697c48f
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,6 @@ def demo_process(input_img):
|
|
18 |
|
19 |
task_prompt = f"<s_cord-v2>"
|
20 |
|
21 |
-
image = Image.open("./sample_image_cord_test_receipt_00004.png")
|
22 |
-
image.save("cord_sample_receipt1.png")
|
23 |
image = Image.open("./sample_image_cord_test_receipt_00012.png")
|
24 |
image.save("cord_sample_receipt2.png")
|
25 |
|
@@ -31,14 +29,14 @@ demo = gr.Interface(
|
|
31 |
fn=demo_process,
|
32 |
inputs= gr.inputs.Image(type="pil"),
|
33 |
outputs="json",
|
34 |
-
title=f"Donut 🍩 demonstration for `cord-v2` task",
|
35 |
description="""This model is trained with 800 Indonesian receipt images of CORD dataset. <br>
|
36 |
Demonstrations for other types of documents/tasks are available at https://github.com/clovaai/donut <br>
|
37 |
More CORD receipt images are available at https://huggingface.co/datasets/naver-clova-ix/cord-v2
|
38 |
More details are available at:
|
39 |
- Paper: https://arxiv.org/abs/2111.15664
|
40 |
- GitHub: https://github.com/clovaai/donut""",
|
41 |
-
examples=[["
|
42 |
cache_examples=False,
|
43 |
)
|
44 |
demo.launch()
|
|
|
18 |
|
19 |
task_prompt = f"<s_cord-v2>"
|
20 |
|
|
|
|
|
21 |
image = Image.open("./sample_image_cord_test_receipt_00012.png")
|
22 |
image.save("cord_sample_receipt2.png")
|
23 |
|
|
|
29 |
fn=demo_process,
|
30 |
inputs= gr.inputs.Image(type="pil"),
|
31 |
outputs="json",
|
32 |
+
title=f"Donut 🍩 demonstration for `cord-v2` task as 🤗 Inference Endpoint",
|
33 |
description="""This model is trained with 800 Indonesian receipt images of CORD dataset. <br>
|
34 |
Demonstrations for other types of documents/tasks are available at https://github.com/clovaai/donut <br>
|
35 |
More CORD receipt images are available at https://huggingface.co/datasets/naver-clova-ix/cord-v2
|
36 |
More details are available at:
|
37 |
- Paper: https://arxiv.org/abs/2111.15664
|
38 |
- GitHub: https://github.com/clovaai/donut""",
|
39 |
+
examples=[["cord_sample_receipt2.png"]],
|
40 |
cache_examples=False,
|
41 |
)
|
42 |
demo.launch()
|