pgurazada1 commited on
Commit
87e89d8
1 Parent(s): 4f9109c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py CHANGED
@@ -42,10 +42,33 @@ def predict(user_input):
42
 
43
  textbox = gr.Textbox(placeholder="Enter your query here", lines=6)
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  interface = gr.Interface(
46
  inputs=textbox, fn=predict, outputs="text",
47
  title="Query BFSI customer information",
48
  description="This web API presents an interface to ask questions on customer information stored in a database.",
 
49
  examples=[["What is the average balance maintained by our customers?", ""],
50
  ["How many customers have subscribed to a term deposit?", ""],
51
  ["How many customers have defaulted on loans?", ""],
 
42
 
43
  textbox = gr.Textbox(placeholder="Enter your query here", lines=6)
44
 
45
+ schema = """
46
+ The schema of the table you can query on is presented below:
47
+ | Column | Type |
48
+ |-----------|--------|
49
+ | age | int |
50
+ | job | str |
51
+ | marital | str |
52
+ | education | str |
53
+ | default | yes/no |
54
+ | balance | int |
55
+ | housing | yes/no |
56
+ | loan | yes/no |
57
+ | contact | str |
58
+ | day | int |
59
+ | month | str |
60
+ | duration | int |
61
+ | campaign | int |
62
+ | pdays | int |
63
+ | poutcome | str |
64
+ | deposit | yes/no |
65
+ """
66
+
67
  interface = gr.Interface(
68
  inputs=textbox, fn=predict, outputs="text",
69
  title="Query BFSI customer information",
70
  description="This web API presents an interface to ask questions on customer information stored in a database.",
71
+ article=schema
72
  examples=[["What is the average balance maintained by our customers?", ""],
73
  ["How many customers have subscribed to a term deposit?", ""],
74
  ["How many customers have defaulted on loans?", ""],