Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,8 @@ from sklearn.model_selection import train_test_split
|
|
| 6 |
from sklearn.linear_model import LogisticRegression
|
| 7 |
from sklearn.preprocessing import LabelEncoder, StandardScaler
|
| 8 |
from sklearn.metrics import classification_report, confusion_matrix, roc_curve, auc
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Load the dataset
|
| 11 |
@st.cache
|
|
@@ -25,9 +27,10 @@ if choice == "Data Overview":
|
|
| 25 |
st.write(data.head())
|
| 26 |
|
| 27 |
st.write("### Dataset Information")
|
| 28 |
-
buffer
|
|
|
|
| 29 |
data.info(buf=buffer)
|
| 30 |
-
s =
|
| 31 |
st.text(s)
|
| 32 |
|
| 33 |
st.write("### Dataset Statistics")
|
|
|
|
| 6 |
from sklearn.linear_model import LogisticRegression
|
| 7 |
from sklearn.preprocessing import LabelEncoder, StandardScaler
|
| 8 |
from sklearn.metrics import classification_report, confusion_matrix, roc_curve, auc
|
| 9 |
+
from io import StringIO
|
| 10 |
+
|
| 11 |
|
| 12 |
# Load the dataset
|
| 13 |
@st.cache
|
|
|
|
| 27 |
st.write(data.head())
|
| 28 |
|
| 29 |
st.write("### Dataset Information")
|
| 30 |
+
# Create a buffer for the info output
|
| 31 |
+
buffer = StringIO()
|
| 32 |
data.info(buf=buffer)
|
| 33 |
+
s = buffer.getvalue() # Get the output from the buffer
|
| 34 |
st.text(s)
|
| 35 |
|
| 36 |
st.write("### Dataset Statistics")
|