From 0d7aa6589a3e2edf883fe1046d1d9df9b0c544cc Mon Sep 17 00:00:00 2001 From: RAYMOND Olivier <34789438+Isdinval@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:19:54 +0200 Subject: [PATCH] Update dashboard_CLOUD.py --- dashboard_CLOUD.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dashboard_CLOUD.py b/dashboard_CLOUD.py index f57c39a..95d3212 100644 --- a/dashboard_CLOUD.py +++ b/dashboard_CLOUD.py @@ -172,7 +172,19 @@ def load_test_data(): else: st.error("Failed to load data from GitHub.") return None - return feature_names + + +# Load the test data +@st.cache_data() # Cache the test data to avoid reloading +def load_test_data_description(): + url = 'https://raw.githubusercontent.com/Isdinval/OC_PROJET7/main/HomeCredit_columns_description.csv' + response = requests.get(url) + if response.status_code == 200: + return pd.read_csv(StringIO(response.text), delimiter=",") + else: + st.error("Failed to load data from GitHub.") + return None + @@ -185,6 +197,8 @@ def load_test_data(): # Load Test DATA customer_data = load_test_data() +customer_data_description = load_test_data_description() +st.write(customer_data_description) # Optimal threshold from MLflow optimal_threshold = 0.636364