Wajahat698 commited on
Commit
e141c67
·
verified ·
1 Parent(s): dc09e3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -1704,13 +1704,13 @@ def get_top_scoring_statements(dataset):
1704
  Retrieve top-scoring statements for specific trust buckets based on dataset
1705
 
1706
  Args:
1707
- dataset (str): The selected dataset ('VW Customers' or 'VW Prospects')
1708
 
1709
  Returns:
1710
  str: Formatted top-scoring statements
1711
  """
1712
- if dataset == "VW Customers.xlsx":
1713
- # Top statements for VW Customers
1714
  top_statements = """
1715
  Top Scoring Statements:
1716
 
@@ -1768,7 +1768,7 @@ def chatbot_response(message, history):
1768
 
1769
  # Define datasets and corresponding trust buckets
1770
  datasets = {
1771
- "VW Customers.xlsx": {
1772
  "Development": [
1773
  "We bring together the world's best talent in many disciplines to create your cars. (25%)",
1774
  "Building great and affordable cars is our foundation. (22%)",
@@ -1938,7 +1938,7 @@ def update_ai_dataset_selection(selection):
1938
  reset_variables()
1939
  chat_history.clear()
1940
 
1941
- if selection == "VW Customers":
1942
  selected_dataset_ai = vw_customers_state.value[0] # Use the customer dataset
1943
  elif selection == "VW Prospects":
1944
  selected_dataset_ai = vw_prospects_state.value[0] # Use the prospects dataset
@@ -2053,7 +2053,7 @@ with gr.Blocks(css=css,js=js_func) as demo:
2053
  outputs = reset_outputs()
2054
 
2055
  # Create gr.State components to store file names as lists
2056
- vw_customers_state = gr.State(value=["VW Customers.xlsx"])
2057
  vw_prospects_state = gr.State(value=["Volkswagen Non Customers.xlsx"])
2058
 
2059
 
@@ -2072,7 +2072,7 @@ with gr.Blocks(css=css,js=js_func) as demo:
2072
 
2073
  # Define the radio button component
2074
  radio = gr.Radio(
2075
- choices=["VW Customers", "VW Prospects"],
2076
  label="Select a dataset for Trustifier.AI®",
2077
  visible=True,
2078
  )
 
1704
  Retrieve top-scoring statements for specific trust buckets based on dataset
1705
 
1706
  Args:
1707
+ dataset (str): The selected dataset ('VW Owners' or 'VW Prospects')
1708
 
1709
  Returns:
1710
  str: Formatted top-scoring statements
1711
  """
1712
+ if dataset == "VW Owners.xlsx":
1713
+ # Top statements for VW Owners
1714
  top_statements = """
1715
  Top Scoring Statements:
1716
 
 
1768
 
1769
  # Define datasets and corresponding trust buckets
1770
  datasets = {
1771
+ "VW Owners.xlsx": {
1772
  "Development": [
1773
  "We bring together the world's best talent in many disciplines to create your cars. (25%)",
1774
  "Building great and affordable cars is our foundation. (22%)",
 
1938
  reset_variables()
1939
  chat_history.clear()
1940
 
1941
+ if selection == "VW Owners":
1942
  selected_dataset_ai = vw_customers_state.value[0] # Use the customer dataset
1943
  elif selection == "VW Prospects":
1944
  selected_dataset_ai = vw_prospects_state.value[0] # Use the prospects dataset
 
2053
  outputs = reset_outputs()
2054
 
2055
  # Create gr.State components to store file names as lists
2056
+ vw_customers_state = gr.State(value=["VW Owners.xlsx"])
2057
  vw_prospects_state = gr.State(value=["Volkswagen Non Customers.xlsx"])
2058
 
2059
 
 
2072
 
2073
  # Define the radio button component
2074
  radio = gr.Radio(
2075
+ choices=["VW Owners", "VW Prospects"],
2076
  label="Select a dataset for Trustifier.AI®",
2077
  visible=True,
2078
  )