Spaces:
Sleeping
Sleeping
Surbhi
commited on
Commit
·
1ed90b8
1
Parent(s):
a7b35e7
Feature extraction and model training
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ generated_code = f"""
|
|
72 |
import pandas as pd
|
73 |
from sklearn.model_selection import train_test_split
|
74 |
from sklearn.preprocessing import StandardScaler
|
75 |
-
from {model.__module__} import {model.__class__.__name__}
|
76 |
|
77 |
# Load Data
|
78 |
df = pd.read_csv('{dataset_path}')
|
@@ -88,7 +88,7 @@ X_train = scaler.fit_transform(X_train)
|
|
88 |
X_test = scaler.transform(X_test)
|
89 |
|
90 |
# Train Model
|
91 |
-
model = {model.__class__.__name__}()
|
92 |
model.fit(X_train, y_train)
|
93 |
|
94 |
# Predict
|
|
|
72 |
import pandas as pd
|
73 |
from sklearn.model_selection import train_test_split
|
74 |
from sklearn.preprocessing import StandardScaler
|
75 |
+
from {model_mapping[model].__class__.__module__} import {model_mapping[model].__class__.__name__}
|
76 |
|
77 |
# Load Data
|
78 |
df = pd.read_csv('{dataset_path}')
|
|
|
88 |
X_test = scaler.transform(X_test)
|
89 |
|
90 |
# Train Model
|
91 |
+
model = {model_mapping[model].__class__.__name__}()
|
92 |
model.fit(X_train, y_train)
|
93 |
|
94 |
# Predict
|