Spaces:
Sleeping
Sleeping
scorpion237
commited on
Commit
•
e1c2643
1
Parent(s):
9be7833
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import streamlit as st, base64
|
2 |
import pandas as pd, seaborn as sns
|
3 |
import os, matplotlib.pyplot as plt
|
4 |
-
import pickle, numpy as np
|
|
|
5 |
from sklearn.preprocessing import StandardScaler
|
6 |
from sklearn.metrics import classification_report, accuracy_score, confusion_matrix
|
7 |
|
@@ -246,7 +247,8 @@ def main():
|
|
246 |
# XGBoost
|
247 |
if st.sidebar.checkbox("XGBoost"):
|
248 |
st.subheader(":orange[XGBoost] :sunglasses:")
|
249 |
-
xg =
|
|
|
250 |
pred = xg.predict(X)
|
251 |
pred_proba = xg.predict_proba(X)
|
252 |
st.subheader(':green[Prediction]')
|
@@ -273,7 +275,7 @@ def main():
|
|
273 |
# ANN
|
274 |
if st.sidebar.checkbox("Neural Network"):
|
275 |
st.subheader(":orange[Neural Network] :sunglasses:")
|
276 |
-
ann =
|
277 |
pred = ann.predict(X)
|
278 |
pred_proba = ann.predict_proba(X)
|
279 |
st.subheader(':green[Prediction]')
|
|
|
1 |
import streamlit as st, base64
|
2 |
import pandas as pd, seaborn as sns
|
3 |
import os, matplotlib.pyplot as plt
|
4 |
+
import pickle, numpy as np, xgboost as xgb
|
5 |
+
from keras.models import load_model
|
6 |
from sklearn.preprocessing import StandardScaler
|
7 |
from sklearn.metrics import classification_report, accuracy_score, confusion_matrix
|
8 |
|
|
|
247 |
# XGBoost
|
248 |
if st.sidebar.checkbox("XGBoost"):
|
249 |
st.subheader(":orange[XGBoost] :sunglasses:")
|
250 |
+
xg = xgb.XGBClassifier()
|
251 |
+
xg = load_model("xg.json")
|
252 |
pred = xg.predict(X)
|
253 |
pred_proba = xg.predict_proba(X)
|
254 |
st.subheader(':green[Prediction]')
|
|
|
275 |
# ANN
|
276 |
if st.sidebar.checkbox("Neural Network"):
|
277 |
st.subheader(":orange[Neural Network] :sunglasses:")
|
278 |
+
ann = load_model("ann.h5")
|
279 |
pred = ann.predict(X)
|
280 |
pred_proba = ann.predict_proba(X)
|
281 |
st.subheader(':green[Prediction]')
|