umair894 commited on
Commit
b109e7f
1 Parent(s): 0ec3a0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -32
app.py CHANGED
@@ -71,28 +71,28 @@ def normalize_bbox(box, width, height, padding=0.005):
71
  return [min_x * width, min_y * height, max_x * width, max_y * height]
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?",
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",
@@ -288,15 +288,15 @@ gradio-app h2, .gradio-app h2 {
288
  """
289
 
290
  with gr.Blocks(css=CSS) as demo:
291
- gr.Markdown("# DocQuery: Document Query Engine")
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)
@@ -339,7 +339,7 @@ with gr.Blocks(css=CSS) as demo:
339
  gr.Markdown("## 2. Ask a question")
340
  question = gr.Textbox(
341
  label="Question",
342
- placeholder="e.g. What is the invoice number?",
343
  lines=1,
344
  max_lines=1,
345
  )
 
71
  return [min_x * width, min_y * height, max_x * width, max_y * height]
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?",
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",
 
288
  """
289
 
290
  with gr.Blocks(css=CSS) as demo:
291
+ gr.Markdown("# PDFPlus")
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)
 
339
  gr.Markdown("## 2. Ask a question")
340
  question = gr.Textbox(
341
  label="Question",
342
+ placeholder="e.g. What is the patient name?",
343
  lines=1,
344
  max_lines=1,
345
  )