avin1103 commited on
Commit
78da645
·
1 Parent(s): 8ec3bfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -21
app.py CHANGED
@@ -21,7 +21,7 @@ def ensure_list(x):
21
 
22
 
23
  CHECKPOINTS = {
24
- "LayoutLMv1 🦉": "impira/layoutlm-document-qa"
25
  }
26
 
27
  PIPELINES = {}
@@ -70,18 +70,10 @@ def normalize_bbox(box, width, height, padding=0.005):
70
 
71
 
72
  examples = [
73
- [
74
- "invoice.png",
75
- "What is the invoice number?",
76
- ],
77
  [
78
  "contract.jpeg",
79
  "What is the purchase amount?",
80
  ],
81
- [
82
- "statement.png",
83
- "What are net sales for 2020?",
84
- ],
85
  # [
86
  # "docquery.png",
87
  # "How many likes does the space have?",
@@ -93,9 +85,7 @@ examples = [
93
  ]
94
 
95
  question_files = {
96
- "What are net sales for 2020?": "statement.pdf",
97
- "How many likes does the space have?": "https://huggingface.co/spaces/impira/docquery",
98
- "What is the title of post number 5?": "https://news.ycombinator.com",
99
  }
100
 
101
 
@@ -286,15 +276,15 @@ gradio-app h2, .gradio-app h2 {
286
  """
287
 
288
  with gr.Blocks(css=CSS) as demo:
289
- gr.Markdown("# DocQuery: Document Query Engine")
290
- gr.Markdown(
291
- "DocQuery (created by [Impira](https://impira.com?utm_source=huggingface&utm_medium=referral&utm_campaign=docquery_space))"
292
- " uses LayoutLMv1 fine-tuned on DocVQA, a document visual question"
293
- " answering dataset, as well as SQuAD, which boosts its English-language comprehension."
294
- " To use it, simply upload an image or PDF, type a question, and click 'submit', or "
295
- " click one of the examples to load them."
296
- " DocQuery is MIT-licensed and available on [Github](https://github.com/impira/docquery)."
297
- )
298
 
299
  document = gr.Variable()
300
  example_question = gr.Textbox(visible=False)
 
21
 
22
 
23
  CHECKPOINTS = {
24
+ "SoKat AI Query Engine": "impira/layoutlm-document-qa"
25
  }
26
 
27
  PIPELINES = {}
 
70
 
71
 
72
  examples = [
 
 
 
 
73
  [
74
  "contract.jpeg",
75
  "What is the purchase amount?",
76
  ],
 
 
 
 
77
  # [
78
  # "docquery.png",
79
  # "How many likes does the space have?",
 
85
  ]
86
 
87
  question_files = {
88
+
 
 
89
  }
90
 
91
 
 
276
  """
277
 
278
  with gr.Blocks(css=CSS) as demo:
279
+ # gr.Markdown("# DocQuery: Document Query Engine")
280
+ # gr.Markdown(
281
+ # "DocQuery (created by [Impira](https://impira.com?utm_source=huggingface&utm_medium=referral&utm_campaign=docquery_space))"
282
+ # " uses LayoutLMv1 fine-tuned on DocVQA, a document visual question"
283
+ # " answering dataset, as well as SQuAD, which boosts its English-language comprehension."
284
+ # " To use it, simply upload an image or PDF, type a question, and click 'submit', or "
285
+ # " click one of the examples to load them."
286
+ # " DocQuery is MIT-licensed and available on [Github](https://github.com/impira/docquery)."
287
+ # )
288
 
289
  document = gr.Variable()
290
  example_question = gr.Textbox(visible=False)