vincentclaes commited on
Commit
e025431
1 Parent(s): 1629f42

add examples for querying the text

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -2,7 +2,13 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  title = "Question Answer on Text"
5
- description = "Provide a piece of text, ask a question and get a meaningful answer."
 
 
 
 
 
 
6
 
7
 
8
  classifier = pipeline(
@@ -25,18 +31,18 @@ examples = [
25
  [
26
  """The invoice contains all the goods that are described in the order with number x9820be.
27
  The goods are packaged and should arrive at the destination on 31/12/2023.
28
- We kindly request to transfer the amount within 30 days of the invoice date to the account number BE00 9999 9999 9999""",
29
  "what is the timeline to transfer the money?",
30
  ],
31
  [
32
  """The invoice contains all the goods that are described in the order with number x9820be.
33
  The goods are packaged and should arrive at the destination on 31/12/2023.
34
- We kindly request to transfer the amount within 30 days of the invoice date to the account number BE00 9999 9999 9999""",
35
  "what is the account number to transfer the money?",
36
  ],[
37
  """The invoice contains all the goods that are described in the order with number x9820be.
38
  The goods are packaged and should arrive at the destination on 31/12/2023.
39
- We kindly request to transfer the amount within 30 days of the invoice date to the account number BE00 9999 9999 9999""",
40
  "order number",
41
  ],
42
  [
@@ -61,4 +67,5 @@ gr.Interface(
61
  outputs=gr.outputs.Textbox(label="Answer"),
62
  title=title,
63
  description=description,
 
64
  ).launch(share=False)
 
2
  from transformers import pipeline
3
 
4
  title = "Question Answer on Text"
5
+ description = """
6
+ - Provide a piece of text.
7
+ - Ask a question or specify an entity you would like to extract.
8
+ - Receive an answer.
9
+
10
+ Try out the examples at the bottom.
11
+ """
12
 
13
 
14
  classifier = pipeline(
 
31
  [
32
  """The invoice contains all the goods that are described in the order with number x9820be.
33
  The goods are packaged and should arrive at the destination on 31/12/2023.
34
+ We kindly request to transfer the amount within 30 days of the invoice date to the account number IE12BOFI90000112345678. """,
35
  "what is the timeline to transfer the money?",
36
  ],
37
  [
38
  """The invoice contains all the goods that are described in the order with number x9820be.
39
  The goods are packaged and should arrive at the destination on 31/12/2023.
40
+ We kindly request to transfer the amount within 30 days of the invoice date to the account number IE12BOFI90000112345678""",
41
  "what is the account number to transfer the money?",
42
  ],[
43
  """The invoice contains all the goods that are described in the order with number x9820be.
44
  The goods are packaged and should arrive at the destination on 31/12/2023.
45
+ We kindly request to transfer the amount within 30 days of the invoice date to the account number IE12BOFI90000112345678""",
46
  "order number",
47
  ],
48
  [
 
67
  outputs=gr.outputs.Textbox(label="Answer"),
68
  title=title,
69
  description=description,
70
+ examples=examples,
71
  ).launch(share=False)