nielsr HF staff commited on
Commit
cf211de
1 Parent(s): d4112c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -39,13 +39,16 @@ def process_document(image):
39
 
40
  return processor.token2json(sequence)
41
 
 
 
 
42
  demo = gr.Interface(
43
  fn=process_document,
44
  inputs="image",
45
  outputs="json",
46
- title=f"Demo: Donut 🍩 for Document Image Classification",
47
- description = "Gradio Demo for Donut, an instance of `VisionEncoderDecoderModel` fine-tuned on RVL-CDIP (document image classification). To use it, simply upload your image and click 'submit', or click one of the examples to load them. Read more at the links below."
48
- 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>",
49
  enable_queue=True,
50
  examples=[["example.png"]],
51
  cache_examples=False)
 
39
 
40
  return processor.token2json(sequence)
41
 
42
+ description = "Gradio Demo for Donut, an instance of `VisionEncoderDecoderModel` fine-tuned on RVL-CDIP (document image classification). To use it, simply upload your image and click 'submit', or click one of the examples to load them. Read more at the links below."
43
+ 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>"
44
+
45
  demo = gr.Interface(
46
  fn=process_document,
47
  inputs="image",
48
  outputs="json",
49
+ title="Demo: Donut 🍩 for Document Image Classification",
50
+ description=description,
51
+ article=article,
52
  enable_queue=True,
53
  examples=[["example.png"]],
54
  cache_examples=False)