Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1898,11 +1898,16 @@ def display_trust_score_2():
|
|
| 1898 |
fig2 = create_trust_score_2()
|
| 1899 |
return plot_to_svg(fig2)
|
| 1900 |
|
| 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":
|
|
|
|
| 1898 |
fig2 = create_trust_score_2()
|
| 1899 |
return plot_to_svg(fig2)
|
| 1900 |
|
| 1901 |
+
def reset_variables():
|
| 1902 |
+
"""
|
| 1903 |
+
Reset global variables to handle dataset changes.
|
| 1904 |
+
"""
|
| 1905 |
+
global selected_dataset_ai
|
| 1906 |
+
selected_dataset_ai = None
|
| 1907 |
|
| 1908 |
def update_ai_dataset_selection(selection):
|
| 1909 |
global selected_dataset_ai # Ensure the global variable is updated
|
| 1910 |
+
reset_variables()
|
| 1911 |
if selection == "VW Customers":
|
| 1912 |
selected_dataset_ai = vw_customers_state.value[0] # Use the customer dataset
|
| 1913 |
elif selection == "VW Prospects":
|