nielsr HF staff commited on
Commit
386ad78
1 Parent(s): e4e8fdd

Add packages.txt

Browse files
Files changed (2) hide show
  1. app.py +1 -2
  2. packages.txt +1 -0
app.py CHANGED
@@ -9,7 +9,6 @@ os.system('pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://do
9
  os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html')
10
 
11
  ## install PyTesseract
12
- os.system('sudo apt-get install tesseract-ocr')
13
  os.system('pip install -q pytesseract')
14
 
15
  import gradio as gr
@@ -81,7 +80,7 @@ def process_image(image):
81
 
82
 
83
  title = "Interactive demo: LayoutLMv2"
84
- description = "Demo for Microsoft's LayoutLMv2, a Transformer for state-of-the-art document image understanding tasks. To use it, simply upload an image or use the example image below. Results will show up in a few seconds."
85
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2012.14740'>LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding</a> | <a href='https://github.com/microsoft/unilm'>Github Repo</a></p>"
86
  examples =[['document.png']]
87
 
 
9
  os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html')
10
 
11
  ## install PyTesseract
 
12
  os.system('pip install -q pytesseract')
13
 
14
  import gradio as gr
 
80
 
81
 
82
  title = "Interactive demo: LayoutLMv2"
83
+ description = "Demo for Microsoft's LayoutLMv2, a Transformer for state-of-the-art document image understanding tasks. This particular model is fine-tuned on FUNSD, a dataset of manually annotated forms. It annotates the words into QUESTION/ANSWER/HEADER/OTHER. To use it, simply upload an image or use the example image below. Results will show up in a few seconds."
84
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2012.14740'>LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding</a> | <a href='https://github.com/microsoft/unilm'>Github Repo</a></p>"
85
  examples =[['document.png']]
86
 
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ tesseract-ocr