Ankur Goyal commited on
Commit
43ea41e
1 Parent(s): 8bd074d

Web Support

Browse files
Files changed (5) hide show
  1. app.py +11 -1
  2. docquery.png +0 -0
  3. hacker_news.png +0 -0
  4. packages.txt +2 -0
  5. requirements.txt +1 -2
app.py CHANGED
@@ -9,7 +9,7 @@ import gradio as gr
9
 
10
  import torch
11
  from docquery import pipeline
12
- from docquery.document import load_bytes, load_document, ImageDocument
13
  from docquery.ocr_reader import get_ocr_reader
14
 
15
 
@@ -84,10 +84,20 @@ examples = [
84
  "statement.png",
85
  "What are net sales for 2020?",
86
  ],
 
 
 
 
 
 
 
 
87
  ]
88
 
89
  question_files = {
90
  "What are net sales for 2020?": "statement.pdf",
 
 
91
  }
92
 
93
 
9
 
10
  import torch
11
  from docquery import pipeline
12
+ from docquery.document import load_document, ImageDocument
13
  from docquery.ocr_reader import get_ocr_reader
14
 
15
 
84
  "statement.png",
85
  "What are net sales for 2020?",
86
  ],
87
+ [
88
+ "docquery.png",
89
+ "How many likes does the space have?",
90
+ ],
91
+ [
92
+ "hacker_news.png",
93
+ "What is the title of post number 5?",
94
+ ],
95
  ]
96
 
97
  question_files = {
98
  "What are net sales for 2020?": "statement.pdf",
99
+ "How many likes does the space have?": "https://huggingface.co/spaces/impira/docquery",
100
+ "What is the title of post number 5?": "https://news.ycombinator.com",
101
  }
102
 
103
 
docquery.png ADDED
hacker_news.png ADDED
packages.txt CHANGED
@@ -1,2 +1,4 @@
1
  poppler-utils
2
  tesseract-ocr
 
 
1
  poppler-utils
2
  tesseract-ocr
3
+ chromium
4
+ chromium-driver
requirements.txt CHANGED
@@ -1,4 +1,3 @@
1
  torch
2
  git+https://github.com/huggingface/transformers.git@21f6f58721dd9154357576be6de54eefef1f1818
3
- git+https://github.com/impira/docquery.git@8d92692c36f63ef652f3c84cccedd5674ee7b383
4
- sentencepiece
1
  torch
2
  git+https://github.com/huggingface/transformers.git@21f6f58721dd9154357576be6de54eefef1f1818
3
+ git+https://github.com/impira/docquery.git@a494fe5af452d20011da75637aa82d246a869fa0#egg=docquery[web,donut]