Spaces:
Sleeping
Sleeping
File size: 5,299 Bytes
a3a3d82 3dfdb3d 80bf00f 3dfdb3d bccceb7 3dfdb3d 80bf00f bccceb7 80bf00f 3dfdb3d bccceb7 80bf00f 3dfdb3d 268736b 3dfdb3d 268736b 3dfdb3d a3a3d82 457fb27 606b372 3dfdb3d 5ab5183 a3a3d82 3dfdb3d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
import gradio as gr
# Define the knowledge base as a dictionary
knowledge_base = {
"SOP": "Sales Operations Planning / Standard Operational Procedure / Start of Production",
"NTO": "Net Turnover",
"APFO": "Adjusted Profit from Operations",
"LEP": "Limited Edition Pack",
"AD": "Area Director",
"LT": "Leadership Team",
"OLT": "Operations Leadership Team",
"MLT": "Marketing Leadership Team",
"FLT": "Finance Leadership Team",
"GSD": "Group Service Delivery or Global Service Desk",
"TPD": "Tobacco Products Directive",
"WMS": "Warehouse Management System / Wrapping Material Specification",
"GLT": "Green Leaf Threshing",
"MBL": "Modern BAT Leaf",
"TAO": "One SAP",
"PLM": "Product Lifecycle Management",
"PMD": "Primary Manufacturing Unit",
"SMD": "Secondary Manufacturing Unit",
"SLA": "Service Level Agreement",
"Coco": "Consumer Complaint",
"Cuco": "Customer Complaint",
"Osso": "Operation Skill Sourcing Officer",
"Moso": "Marketing Skill Sourcing Manager",
"FT": "Field Technician",
"STT": "Sales to Trade",
"ADS": "Average Daily Sales",
"RA": "Retailers Assistant",
"SR": "Sales Representative",
"VBB": "Valuable Business Partner",
"MT": "Modern Trade",
"BCP": "Business Continuity Planning",
"ABC": "Activity Based Costing",
"ABD": "Advance Booking Deadlines",
"AC": "Assessment Centre",
"ACA": "Area Cycle Alignment",
"ACF": "Active Charcoal Filter",
"ACT": "Advance Corporation Tax",
"ADR": "American Depositary Receipts",
"Ad-valorem": "Type of tobacco taxation typically calculated on the value of cigarettes sold",
"ADW": "Active Data Warehouse",
"AGV": "Automated Guided Vehicle",
"AIR": "Average Issue Readership",
"AIT": "Anti Illicit Trade",
"ALPS": "Area Leaf Planning System",
"AME": "Achieving Marketing Excellence database / Africa Middle East (region)",
"AMGP": "Additives and Material Guidance Panel",
"AO": "Area Office",
"AP": "Accounts Payable",
"APO": "Advanced Planner & Optimiser",
"APS": "Advanced Planning System / Annual Planning System",
"APV": "Accounts Payable Voucher",
"AR": "Accounts Receivable",
"ASH": "Action on Smoking and Health",
"ASP": "Aspirational Premium",
"ASPAC": "Asia Pacific (Region)",
"ASU30": "Adult Smoker Under 30 Years Old",
"AT": "Account Teams",
"ATC": "Advanced Technologies Cambridge",
"ATIF": "Any Time In Full",
"ATL": "Above The Line (traditional media advertising term)",
"AV": "Ad Valorem",
"AWAP": "Above Weighted Average Price",
"B2B": "Business to Business",
"B2C": "Business to Consumer",
"BA": "Business Analyst",
"BASS": "British American Shared Services",
"BAT": "British American Tobacco",
"BATMark": "Trademark Department",
"BATPS": "British American Tobacco Pension Scheme",
"BAU": "Business as Usual",
"BCC": "Board Compensation Committee",
"BCM": "Business Change Manager / Business Continuity Management",
"BCP": "Business Continuity Plan",
"BCT": "Business Controls Team",
"BDD": "Business Development Department",
"BEL": "Business Excellence for Leaders",
"BESS": "Brand Excellence Series",
"BEST": "Business Enablers Survey Tool",
"BIA": "Business Impact Analysis",
"BIB": "Blend In a Box",
"BIM": "Brand Image Mapping / Business Implementation Manager",
"BLM": "Brand Launch & Modification",
"BLT": "BATCCA Leadership Team",
"BM": "Brand Manager",
"BMF": "Brand Modification Form",
"Bn": "Billion",
"BOD": "Bill Of Distribution",
"BOL": "Bill Of Lending",
"BOM": "Bill Of Materials",
"BOSS": "Business and Operational System Steering Group",
"BPCS": "Business Planning & Control System (Integrated AS400 computer system)",
"BPI": "Business Process Improvement",
"BPO": "Business Process Outsourcing",
"BPR": "Business Process Re-engineering",
"BPTO": "Brand Price Trade – Off",
"BritAm": "The name of the proprietary typeface designed specifically for the British American Tobacco logotype in our corporate signature",
"BRM": "Budget Review Meeting",
"BRR": "Business Risk Register",
"BS": "Balance Sheet",
"BSE": "Brand Support Expenditure",
"BSU": "Business Support Unit",
"BT": "British Telecoms",
"BTC": "British American Tobacco Technology Centre",
"BTL": "Below The Line (Traditional merchandising/promotions)",
"BVS": "Brand Value Segment",
"BW": "Business Warehouse",
"BWAP": "Below Weighted Average Price",
"BY": "Burley",
}
# Define the Gradio interface function
def chatbot_interface(acronym):
acronym = acronym.strip().upper() # Remove leading/trailing whitespace and convert to uppercase
if acronym in knowledge_base:
response = f"Answer: {knowledge_base[acronym]}"
else:
response = "Not found in the knowledge base"
return response
# Create the Gradio interface
iface = gr.Interface(
fn=chatbot_interface,
inputs="text",
outputs="text",
title="BATB Acronym Finder",
description="Enter an acronym to find its abbreviation in the knowledge base.",
theme='default'
)
# Launch the interface
iface.launch()
|