Commit
·
111fd24
1
Parent(s):
a5788b8
try to display ds
Browse files
app.py
CHANGED
|
@@ -1,4 +1,28 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
from __future__ import division
|
| 4 |
|
| 5 |
+
import numpy as np
|
| 6 |
+
|
| 7 |
+
import xgboost as xgb
|
| 8 |
+
|
| 9 |
+
x = st.slider("Select a value")
|
| 10 |
+
st.write(x, "squared is", x * x)
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
data = pd.read_csv("hf://datasets/Ammok/hair_health/predict_hair_fall.csv")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
# Calculate split point (70%)
|
| 17 |
+
split_point = int(len(data) * 0.7)
|
| 18 |
+
|
| 19 |
+
# Split into train and test
|
| 20 |
+
train = data.iloc[:split_point]
|
| 21 |
+
test = data.iloc[split_point:]
|
| 22 |
+
|
| 23 |
+
# If you need numpy arrays instead of dataframes
|
| 24 |
+
train_np = train.to_numpy()
|
| 25 |
+
test_np = test.to_numpy()
|
| 26 |
+
|
| 27 |
+
boi = st.dataframe(data)
|
| 28 |
+
st.write(data)
|