Spaces:
Runtime error
Runtime error
Isabel Gwara
commited on
Commit
·
42b052d
1
Parent(s):
703d628
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,7 @@ st.subheader('Feeling like you might need a better coping strategy? Take the qui
|
|
28 |
### data transformation ###
|
29 |
### ------------------------------ ###
|
30 |
|
|
|
31 |
|
32 |
# load dataset
|
33 |
uncleaned_data = pd.read_csv('data.csv')
|
@@ -87,7 +88,7 @@ def train_model():
|
|
87 |
y = data.iloc[: , num_features:]
|
88 |
|
89 |
# split data into training and testing sets
|
90 |
-
|
91 |
|
92 |
# instantiate the model (using default parameters)
|
93 |
model = LogisticRegression()
|
|
|
28 |
### data transformation ###
|
29 |
### ------------------------------ ###
|
30 |
|
31 |
+
global x_train, x_test, y_train, y_test
|
32 |
|
33 |
# load dataset
|
34 |
uncleaned_data = pd.read_csv('data.csv')
|
|
|
88 |
y = data.iloc[: , num_features:]
|
89 |
|
90 |
# split data into training and testing sets
|
91 |
+
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.25)
|
92 |
|
93 |
# instantiate the model (using default parameters)
|
94 |
model = LogisticRegression()
|