Shanshan Wang commited on
Commit
2d6f1c5
1 Parent(s): 2d2df74
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -23,6 +23,7 @@ model_paths = {
23
 
24
  example_prompts = [
25
  "Read the text and provide word by word ocr for the document. <doc>",
 
26
  "Extract the text from the image.",
27
  "Extract the text from the image and fill the following json {'license_number':'',\n'full_name':'',\n'date_of_birth':'',\n'address':'',\n'issue_date':'',\n'expiration_date':'',\n}",
28
  "Please extract the following fields, and return the result in JSON format: supplier_name, supplier_address, customer_name, customer_address, invoice_number, invoice_total_amount, invoice_tax_amount",
@@ -369,6 +370,7 @@ with gr.Blocks() as demo:
369
  gr.Examples(
370
  examples=[
371
  ["assets/handwritten-note-example.jpg", "Read the text on the image"],
 
372
  ["assets/driver_license.png", "Extract the text from the image and fill the following json {'license_number':'',\n'full_name':'',\n'date_of_birth':'',\n'address':'',\n'issue_date':'',\n'expiration_date':'',\n}"],
373
  ["assets/invoice.png", "Please extract the following fields, and return the result in JSON format: supplier_name, supplier_address, customer_name, customer_address, invoice_number, invoice_total_amount, invoice_tax_amount"],
374
  ["assets/CBA-1H23-Results-Presentation_wheel.png", "What is the efficiency of H2O.AI in document processing?"],
 
23
 
24
  example_prompts = [
25
  "Read the text and provide word by word ocr for the document. <doc>",
26
+ "Read the text on the image",
27
  "Extract the text from the image.",
28
  "Extract the text from the image and fill the following json {'license_number':'',\n'full_name':'',\n'date_of_birth':'',\n'address':'',\n'issue_date':'',\n'expiration_date':'',\n}",
29
  "Please extract the following fields, and return the result in JSON format: supplier_name, supplier_address, customer_name, customer_address, invoice_number, invoice_total_amount, invoice_tax_amount",
 
370
  gr.Examples(
371
  examples=[
372
  ["assets/handwritten-note-example.jpg", "Read the text on the image"],
373
+ ["assets/receipt.jpg", "Extract the text from the image."],
374
  ["assets/driver_license.png", "Extract the text from the image and fill the following json {'license_number':'',\n'full_name':'',\n'date_of_birth':'',\n'address':'',\n'issue_date':'',\n'expiration_date':'',\n}"],
375
  ["assets/invoice.png", "Please extract the following fields, and return the result in JSON format: supplier_name, supplier_address, customer_name, customer_address, invoice_number, invoice_total_amount, invoice_tax_amount"],
376
  ["assets/CBA-1H23-Results-Presentation_wheel.png", "What is the efficiency of H2O.AI in document processing?"],