Spaces:
Sleeping
Sleeping
Commit
•
1acc247
1
Parent(s):
fc0db7a
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def main():
|
|
48 |
color:green;'> Classification pour l'octroi de credit </h2>", unsafe_allow_html = True)
|
49 |
|
50 |
# charger le fichier
|
51 |
-
uploaded_file = st.sidebar.file_uploader("
|
52 |
|
53 |
# creation du menu
|
54 |
menu = ["Home", "Data Exploration", "Data Visualisation", "Make prediction"]
|
@@ -170,7 +170,10 @@ def main():
|
|
170 |
st.write(data_encoded)
|
171 |
|
172 |
# separation du jeu de donnee
|
173 |
-
|
|
|
|
|
|
|
174 |
|
175 |
# traintement des valeurs manquantes
|
176 |
sp = SimpleImputer(strategy="most_frequent")
|
|
|
48 |
color:green;'> Classification pour l'octroi de credit </h2>", unsafe_allow_html = True)
|
49 |
|
50 |
# charger le fichier
|
51 |
+
uploaded_file = st.sidebar.file_uploader("Importer fichier csv", type=["csv"])
|
52 |
|
53 |
# creation du menu
|
54 |
menu = ["Home", "Data Exploration", "Data Visualisation", "Make prediction"]
|
|
|
170 |
st.write(data_encoded)
|
171 |
|
172 |
# separation du jeu de donnee
|
173 |
+
if data_encoded.shape[1] == 15:
|
174 |
+
X, y = data_encoded.drop(["Loan_Status_Y"], axis=1), data_encoded["Loan_Status_Y"]
|
175 |
+
else:
|
176 |
+
X = data_encoded
|
177 |
|
178 |
# traintement des valeurs manquantes
|
179 |
sp = SimpleImputer(strategy="most_frequent")
|