SarowarSaurav commited on
Commit
80bf00f
·
verified ·
1 Parent(s): 3dfdb3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +98 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  knowledge_base = {
5
  "SOP": "Sales Operations Planning / Standard Operational Procedure / Start of Production",
6
  "NTO": "Net Turnover",
7
- "APFO": "",
8
  "LEP": "Limited Edition Pack",
9
  "AD": "Area Director",
10
  "LT": "Leadership Team",
@@ -32,12 +32,106 @@ knowledge_base = {
32
  "SR": "Sales Representative",
33
  "VBB": "Valuable Business Partner",
34
  "MT": "Modern Trade",
35
- "BCP": "Business Continuity Planning"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  # Define the Gradio interface function
39
- def chatbot_interface(acronym):
40
- acronym = acronym.strip() # Remove leading/trailing whitespace
41
  if acronym in knowledge_base:
42
  response = f"Answer: {knowledge_base[acronym]}"
43
  else:
 
4
  knowledge_base = {
5
  "SOP": "Sales Operations Planning / Standard Operational Procedure / Start of Production",
6
  "NTO": "Net Turnover",
7
+ "APFO": "Adjusted Profit from Operations",
8
  "LEP": "Limited Edition Pack",
9
  "AD": "Area Director",
10
  "LT": "Leadership Team",
 
32
  "SR": "Sales Representative",
33
  "VBB": "Valuable Business Partner",
34
  "MT": "Modern Trade",
35
+ "BCP": "Business Continuity Planning",
36
+ "ABC": "Activity Based Costing",
37
+ "ABD": "Advance Booking Deadlines",
38
+ "AC": "Assessment Centre",
39
+ "ACA": "Area Cycle Alignment",
40
+ "ACF": "Active Charcoal Filter",
41
+ "ACT": "Advance Corporation Tax",
42
+ "ADR": "American Depositary Receipts",
43
+ "Ad-valorem": "Type of tobacco taxation typically calculated on the value of cigarettes sold",
44
+ "ADW": "Active Data Warehouse",
45
+ "AGV": "Automated Guided Vehicle",
46
+ "AIR": "Average Issue Readership",
47
+ "AIT": "Anti Illicit Trade",
48
+ "ALPS": "Area Leaf Planning System",
49
+ "AME": "Achieving Marketing Excellence database / Africa Middle East (region)",
50
+ "AMGP": "Additives and Material Guidance Panel",
51
+ "AO": "Area Office",
52
+ "AP": "Accounts Payable",
53
+ "APO": "Advanced Planner & Optimiser",
54
+ "APS": "Advanced Planning System / Annual Planning System",
55
+ "APV": "Accounts Payable Voucher",
56
+ "AR": "Accounts Receivable",
57
+ "ASH": "Action on Smoking and Health",
58
+ "ASP": "Aspirational Premium",
59
+ "ASPAC": "Asia Pacific (Region)",
60
+ "ASU30": "Adult Smoker Under 30 Years Old",
61
+ "AT": "Account Teams",
62
+ "ATC": "Advanced Technologies Cambridge",
63
+ "ATIF": "Any Time In Full",
64
+ "ATL": "Above The Line (traditional media advertising term)",
65
+ "AV": "Ad Valorem",
66
+ "AWAP": "Above Weighted Average Price",
67
+ "B2B": "Business to Business",
68
+ "B2C": "Business to Consumer",
69
+ "BA": "Business Analyst",
70
+ "BASS": "British American Shared Services",
71
+ "BAT": "British American Tobacco",
72
+ "BATMark": "Trademark Department",
73
+ "BATPS": "British American Tobacco Pension Scheme",
74
+ "BAU": "Business as Usual",
75
+ "BCC": "Board Compensation Committee",
76
+ "BCM": "Business Change Manager / Business Continuity Management",
77
+ "BCP": "Business Continuity Plan",
78
+ "BCT": "Business Controls Team",
79
+ "BDD": "Business Development Department",
80
+ "BEL": "Business Excellence for Leaders",
81
+ "BESS": "Brand Excellence Series",
82
+ "BEST": "Business Enablers Survey Tool",
83
+ "BIA": "Business Impact Analysis",
84
+ "BIB": "Blend In a Box",
85
+ "BIM": "Brand Image Mapping / Business Implementation Manager",
86
+ "BLM": "Brand Launch & Modification",
87
+ "BLT": "BATCCA Leadership Team",
88
+ "BM": "Brand Manager",
89
+ "BMF": "Brand Modification Form",
90
+ "Bn": "Billion",
91
+ "BCC": "Board Compensation Committee",
92
+ "BCM": "Business Change Manager / Business Continuity Management",
93
+ "BCP": "Business Continuity Plan",
94
+ "BCT": "Business Controls Team",
95
+ "BDD": "Business Development Department",
96
+ "BEL": "Business Excellence for Leaders",
97
+ "BESS": "Brand Excellence Series",
98
+ "BEST": "Business Enablers Survey Tool",
99
+ "BIA": "Business Impact Analysis",
100
+ "BIB": "Blend In a Box",
101
+ "BIM": "Brand Image Mapping / Business Implementation Manager",
102
+ "BLM": "Brand Launch & Modification",
103
+ "BLT": "BATCCA Leadership Team",
104
+ "BM": "Brand Manager",
105
+ "BMF": "Brand Modification Form",
106
+ "Bn": "Billion",
107
+ "BOD": "Bill Of Distribution",
108
+ "BOL": "Bill Of Lending",
109
+ "BOM": "Bill Of Materials",
110
+ "BOSS": "Business and Operational System Steering Group",
111
+ "BPCS": "Business Planning & Control System (Integrated AS400 computer system)",
112
+ "BPI": "Business Process Improvement",
113
+ "BPO": "Business Process Outsourcing",
114
+ "BPR": "Business Process Re-engineering",
115
+ "BPTO": "Brand Price Trade – Off",
116
+ "BritAm": "The name of the proprietary typeface designed specifically for the British American Tobacco logotype in our corporate signature",
117
+ "BRM": "Budget Review Meeting",
118
+ "BRR": "Business Risk Register",
119
+ "BS": "Balance Sheet",
120
+ "BSE": "Brand Support Expenditure",
121
+ "BSU": "Business Support Unit",
122
+ "BT": "British Telecoms",
123
+ "BTC": "British American Tobacco Technology Centre",
124
+ "BTL": "Below The Line (Traditional merchandising/promotions)",
125
+ "BVS": "Brand Value Segment",
126
+ "BW": "Business Warehouse",
127
+ "BWAP": "Below Weighted Average Price",
128
+ "BY": "Burley",
129
+
130
  }
131
 
132
  # Define the Gradio interface function
133
+ def chatbot_interface(Acronym):
134
+ acronym = acronym.strip().upper() # Remove leading/trailing whitespace and convert to uppercase
135
  if acronym in knowledge_base:
136
  response = f"Answer: {knowledge_base[acronym]}"
137
  else: