Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,13 +40,16 @@ def process_document(image, question):
|
|
40 |
|
41 |
return processor.token2json(sequence)
|
42 |
|
|
|
|
|
|
|
43 |
demo = gr.Interface(
|
44 |
fn=process_document,
|
45 |
inputs=["image", "text"],
|
46 |
outputs="json",
|
47 |
title=f"Demo: Donut 🍩 for DocVQA",
|
48 |
-
description
|
49 |
-
article
|
50 |
enable_queue=True,
|
51 |
examples=[["example_1.png", "When is the coffee break?"]],
|
52 |
cache_examples=False)
|
|
|
40 |
|
41 |
return processor.token2json(sequence)
|
42 |
|
43 |
+
description = "Gradio Demo for Donut, an instance of `VisionEncoderDecoderModel` fine-tuned on DocVQA (document visual question answering). To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
44 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.15664' target='_blank'>Donut: OCR-free Document Understanding Transformer</a> | <a href='https://github.com/clovaai/donut' target='_blank'>Github Repo</a></p>"
|
45 |
+
|
46 |
demo = gr.Interface(
|
47 |
fn=process_document,
|
48 |
inputs=["image", "text"],
|
49 |
outputs="json",
|
50 |
title=f"Demo: Donut 🍩 for DocVQA",
|
51 |
+
description=description,
|
52 |
+
article=article,
|
53 |
enable_queue=True,
|
54 |
examples=[["example_1.png", "When is the coffee break?"]],
|
55 |
cache_examples=False)
|