Junaid-EEE11 commited on
Commit
60daf05
·
1 Parent(s): e085bc3

Create utils/preprocessing.py

Browse files
Files changed (1) hide show
  1. utils/preprocessing.py +11 -0
utils/preprocessing.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # utils/preprocessing.py
2
+ import pandas as pd
3
+ from sklearn.preprocessing import StandardScaler
4
+
5
+ def preprocess_data_for_streamlit(data_path):
6
+ df = pd.read_csv(data_path)
7
+ df = feature_engineering(df) # Assuming feature_engineering is defined
8
+ X = df.drop('label', axis=1)
9
+ scaler = StandardScaler()
10
+ X_scaled = scaler.fit_transform(X)
11
+ return df, X_scaled