Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,18 +72,7 @@ def normalize_bbox(box, width, height, padding=0.005):
|
|
72 |
|
73 |
|
74 |
examples = [
|
75 |
-
|
76 |
-
"invoice.png",
|
77 |
-
"What is the invoice number?",
|
78 |
-
],
|
79 |
-
[
|
80 |
-
"contract.jpeg",
|
81 |
-
"What is the purchase amount?",
|
82 |
-
],
|
83 |
-
[
|
84 |
-
"statement.png",
|
85 |
-
"What are net sales for 2020?",
|
86 |
-
],
|
87 |
# [
|
88 |
# "docquery.png",
|
89 |
# "How many likes does the space have?",
|
@@ -95,9 +84,7 @@ examples = [
|
|
95 |
]
|
96 |
|
97 |
question_files = {
|
98 |
-
|
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 |
|
@@ -288,15 +275,7 @@ gradio-app h2, .gradio-app h2 {
|
|
288 |
"""
|
289 |
|
290 |
with gr.Blocks(css=CSS) as demo:
|
291 |
-
|
292 |
-
gr.Markdown(
|
293 |
-
"DocQuery (created by [Impira](https://impira.com?utm_source=huggingface&utm_medium=referral&utm_campaign=docquery_space))"
|
294 |
-
" uses LayoutLMv1 fine-tuned on DocVQA, a document visual question"
|
295 |
-
" answering dataset, as well as SQuAD, which boosts its English-language comprehension."
|
296 |
-
" To use it, simply upload an image or PDF, type a question, and click 'submit', or "
|
297 |
-
" click one of the examples to load them."
|
298 |
-
" DocQuery is MIT-licensed and available on [Github](https://github.com/impira/docquery)."
|
299 |
-
)
|
300 |
|
301 |
document = gr.Variable()
|
302 |
example_question = gr.Textbox(visible=False)
|
|
|
72 |
|
73 |
|
74 |
examples = [
|
75 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
# [
|
77 |
# "docquery.png",
|
78 |
# "How many likes does the space have?",
|
|
|
84 |
]
|
85 |
|
86 |
question_files = {
|
87 |
+
|
|
|
|
|
88 |
}
|
89 |
|
90 |
|
|
|
275 |
"""
|
276 |
|
277 |
with gr.Blocks(css=CSS) as demo:
|
278 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
|
280 |
document = gr.Variable()
|
281 |
example_question = gr.Textbox(visible=False)
|