Wajahat698 commited on
Commit
4239b31
·
verified ·
1 Parent(s): 6f925af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1801,7 +1801,7 @@ def chatbot_response(message, history):
1801
  if selected_dataset_ai in datasets:
1802
  trust_data = datasets[selected_dataset_ai]
1803
  else:
1804
- return "Error: Invalid dataset selection."
1805
 
1806
  # Prepare response with top-scoring statements
1807
  response = f"**Selected Dataset: {selected_dataset_ai}**\n\n"
@@ -1901,6 +1901,8 @@ def display_trust_score_2():
1901
 
1902
 
1903
  def update_ai_dataset_selection(selection):
 
 
1904
  if selection == "VW Customers":
1905
  selected_dataset_ai = vw_customers_state.value[0] # Use the customer dataset
1906
  elif selection == "VW Prospects":
 
1801
  if selected_dataset_ai in datasets:
1802
  trust_data = datasets[selected_dataset_ai]
1803
  else:
1804
+ return f"Error: Invalid dataset selection '{selected_dataset_ai}'."
1805
 
1806
  # Prepare response with top-scoring statements
1807
  response = f"**Selected Dataset: {selected_dataset_ai}**\n\n"
 
1901
 
1902
 
1903
  def update_ai_dataset_selection(selection):
1904
+ global selected_dataset_ai # Ensure the global variable is updated
1905
+
1906
  if selection == "VW Customers":
1907
  selected_dataset_ai = vw_customers_state.value[0] # Use the customer dataset
1908
  elif selection == "VW Prospects":