Spaces:
Runtime error
Runtime error
Ankur Goyal
commited on
Commit
·
43ea41e
1
Parent(s):
8bd074d
Web Support
Browse files- app.py +11 -1
- docquery.png +0 -0
- hacker_news.png +0 -0
- packages.txt +2 -0
- 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
|
| 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@
|
| 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]
|
|
|