-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
479 lines (415 loc) · 23.6 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# Base Package
import streamlit as st
import pandas as pd
import numpy as np
# Modeling Packages
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression, LogisticRegression, Lasso, Ridge
from sklearn import metrics
from sklearn.neighbors import KNeighborsRegressor, KNeighborsClassifier
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from sklearn.svm import SVR, SVC
from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier
# Viz Packages
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
import plotly.figure_factory as ff
import warnings
warnings.filterwarnings("ignore")
st.title("Semi-Auto Machine Learning App")
@st.cache(allow_output_mutation=True)
def upload(uploadfile_):
data = pd.read_csv(uploadfile_)
return data
# EDA
def eda(df):
st.header('Exploratory Data Analysis')
if st.checkbox(label='Dimensions of Data Frame'):
st.write(f'Number of Rows in this data frame are {df.shape[0]}')
st.write(f'Number of Columns in this data frame are {df.shape[1]}')
if st.checkbox(label='Summary of Data Frame'):
st.dataframe(df.describe())
if st.checkbox(label='Data Types of Each Columns'):
st.dataframe(uploaded_file.dtypes.rename('Data Types'))
if st.checkbox(label='Missing Value Count in Each Column'):
st.dataframe(df.isnull().sum().rename('Missing Value Counts'))
if st.checkbox(label='Check Category Count'):
col = st.selectbox(label='Select a Column', options=col_name)
st.dataframe(df[col].value_counts())
if st.checkbox(label='View Correlation'):
st.dataframe(df.corr())
sns.heatmap(pd.DataFrame(df.corr()), annot=True, cmap="viridis")
st.pyplot()
# EVALUATION method for Regression on Metrics Like MSE, MAE, R2
def regression_eval(y_test_set, y_prediction):
st.success(f"Mean Absolute Error is : {metrics.mean_absolute_error(y_test_set, y_prediction)}")
st.success(f"Mean Squared Error is : {metrics.mean_squared_error(y_test_set, y_prediction)}")
st.success(f"Root Mean Squared Error is : {np.sqrt(metrics.mean_squared_error(y_test_set, y_prediction))}")
st.success(f"R-squared value is : {metrics.r2_score(y_test_set, y_prediction)}")
# EVALUATION method for Classification on Metrics Like Accuracy, Confusion Matrix
# noinspection PyPep8Naming
def classification_eval(X_test, clf, y_train, y_test, y_pred):
y = clf.predict_proba(X_test)
result_df = pd.DataFrame(data=y, columns=list(np.unique(y_train)))
st.header('Probability Matrix For Test Set')
st.dataframe(result_df)
cnf_matrix = metrics.confusion_matrix(y_test, y_pred, labels=list(np.unique(y_train)))
fig, ax = plt.subplots()
sns.heatmap(pd.DataFrame(cnf_matrix), annot=True, cmap="viridis", xticklabels=list(np.unique(y_train)),
yticklabels=list(np.unique(y_train)))
plt.title('Confusion Matrix')
ax.xaxis.set_label_position("top")
plt.xlabel('Predicted label')
plt.ylabel('Actual label')
st.pyplot()
st.write("Classification Report")
st.table(metrics.classification_report(y_test, y_pred, output_dict=True, target_names=list(np.unique(y_train))))
st.success(f"Accuracy: {metrics.accuracy_score(y_test, y_pred)}")
# noinspection PyPep8Naming
# Splitting
def df_split(df):
independent_Col = st.multiselect(label='Select Independent Columns', options=col_name)
dependent_Col = st.multiselect(label='Select Dependent Columns', options=col_name)
x = df[independent_Col]
y = df[dependent_Col]
testsize = st.slider('Select Test Size in Percentage', 10, 100)
testsize = testsize / 100
X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=testsize, random_state=42)
return X_train, X_test, y_train, y_test
# Regression
# noinspection PyPep8Naming
def linear_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
if st.checkbox(label='See The Model Result'):
lrr = LinearRegression()
clf = lrr.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def knn_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
n_neighbors = st.slider("Select Number of K", 1, 10)
weights = st.selectbox(label='Select Weight for ', options=['uniform', 'distance'], index=0)
algorithm = st.selectbox(label='Select Algorithm from list', options=['auto', 'kd_tree', 'ball_tree',
'brute_force'], index=0)
leaf_size = st.slider('Select Leaf Size for BallTree or KDTree', 1, 100)
metric = st.selectbox(label='Select Distance Metric', options=['euclidean', 'manhattan', 'chebyshev',
'minkowski', 'wminkowski', 'seuclidean',
'mahalanobis'], index=3)
if st.checkbox(label='See The Model Result'):
knnr = KNeighborsRegressor(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm, leaf_size=leaf_size,
metric=metric, )
clf = knnr.fit(X_train, np.ravel(y_train))
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def lasso_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
alpha = st.slider("Select The Value of Penalty Value or Alpha default is 1", 1, 10)
if st.checkbox(label='See The Model Result'):
lasso = Lasso(alpha=alpha, random_state=44)
clf = lasso.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def ridge_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
alpha = st.slider("Select The Value of Penalty Value or Alpha default is 1", 1, 10)
if st.checkbox(label='See The Model Result'):
ridreg = Ridge(alpha=alpha, random_state=44)
clf = ridreg.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def random_forest_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
n_estimators = st.number_input(label='Enter Number of Estimator (Integer)', min_value=10, max_value=None)
criterion = st.selectbox(label='Select the Split Criteria', options=['mse', 'mae'], index=0)
max_depth = st.number_input(label='Enter Depth of Tree (Integer)', min_value=1, max_value=None)
max_features = st.selectbox(label='Number of Features to consider at split', options=['auto', 'sqrt', 'log2'],
index=0)
max_leaf_nodes = st.number_input(label='Enter Number of leaf Nodes', min_value=3, max_value=None)
if st.checkbox(label='See The Model Result'):
randforreg = RandomForestRegressor(n_estimators=n_estimators, criterion=criterion, max_depth=max_depth,
max_features=max_features, max_leaf_nodes=max_leaf_nodes, random_state=44,
n_jobs=-1)
clf = randforreg.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def support_vector_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
C = st.slider("Select Value of C", 1, 10)
gamma = st.selectbox(label=' Select Kernel coefficient for Poly, rbf and sigmoid', options=['scale', 'auto'],
index=0)
kernel = st.selectbox(label='Select Kernel', options=['linear', 'poly', 'rbf', 'sigmoid', 'precomputed'], index=2)
degree_check_box = st.checkbox(label='If Kernel is Poly Select Degree of Polynomial')
degree = 3
if degree_check_box:
degree = st.number_input(label='Enter the Degree of Polynomial', min_value=2, max_value=None)
degree = int(degree)
if st.checkbox(label='See The Model Result'):
svr = SVR(C=C, kernel=kernel, degree=degree, gamma=gamma)
clf = svr.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
if st.checkbox(label='See The Model Result'):
svr = SVR(C=C, kernel=kernel, degree=degree, gamma=gamma)
clf = svr.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# noinspection PyPep8Naming
def decision_tree_reg(df):
X_train, X_test, y_train, y_test = df_split(df)
criterion = st.selectbox(label='Select Split Criteria', options=['mse', 'friedman_mse', 'mae'], index=0)
max_depth = st.number_input(label='Enter Depth of Tree', min_value=10, max_value=None)
max_features = st.selectbox(label='Number of Features to consider at split', options=['auto', 'sqrt', 'log2'],
index=0)
max_leaf_nodes = st.number_input(label='Enter Number of Leaf Nodes', min_value=3, max_value=None)
if st.checkbox(label='See The Model Result'):
dectreereg = DecisionTreeRegressor(criterion=criterion, random_state=44, max_depth=max_depth,
max_features=max_features, max_leaf_nodes=max_leaf_nodes)
clf = dectreereg.fit(X_train, y_train)
y_pred = clf.predict(X_test)
regression_eval(y_test_set=y_test, y_prediction=y_pred)
# Classification
# noinspection PyPep8Naming
def log_reg(df):
st.write('''
For small datasets, ‘liblinear’ is a good choice, whereas ‘sag’ and ‘saga’ are faster for large ones.
For multiclass problems, only ‘newton-cg’, ‘sag’, ‘saga’ and ‘lbfgs’ handle multinomial loss;
‘liblinear’ is limited to one-versus-rest schemes.
‘newton-cg’, ‘lbfgs’, ‘sag’ and ‘saga’ handle L2 or no penalty
‘liblinear’ and ‘saga’ also handle L1 penalty
‘saga’ also supports ‘elasticnet’ penalty
‘liblinear’ does not support setting penalty='none'
''')
penalty = st.selectbox(label='Select Penalty Norm', options=['l1', 'l2', 'elasticnet', 'none'], index=1)
solver = st.selectbox(label='Select Solver Method', options=['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga'],
index=1)
multi_class = st.selectbox(label='Select Class Type', options=['auto', 'ovr', 'multinomial'], index=0)
X_train, X_test, y_train, y_test = df_split(df)
if st.checkbox(label='See The Model Result'):
logr = LogisticRegression(penalty=penalty, solver=solver, multi_class=multi_class, random_state=0)
clf = logr.fit(X_train, y_train)
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
# noinspection PyPep8Naming
def knn_classification(df):
X_train, X_test, y_train, y_test = df_split(df)
n_neighbors = st.slider("Select Number of K", 1, 10)
weights = st.selectbox(label='Select Weight for ', options=['uniform', 'distance'], index=0)
algorithm = st.selectbox(label='Select Algorithm from list', options=['auto', 'kd_tree', 'ball_tree',
'brute_force'], index=0)
leaf_size = st.slider('Select Leaf Size for BallTree or KDTree', 1, 100)
metric = st.selectbox(label='Select Distance Metric', options=['euclidean', 'manhattan', 'chebyshev',
'minkowski', 'wminkowski', 'seuclidean',
'mahalanobis'], index=3)
if st.checkbox(label='See The Model Result'):
knn = KNeighborsClassifier(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm, leaf_size=leaf_size,
metric=metric)
clf = knn.fit(X_train, np.ravel(y_train))
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
# noinspection PyPep8Naming
def decision_tree_classification(df):
X_train, X_test, y_train, y_test = df_split(df)
criterion = st.selectbox(label='Select the split criteria', options=['gini', 'entropy'], index=0)
max_depth = st.number_input(label='Enter Depth of Tree', min_value=10, max_value=None)
max_features = st.selectbox(label='Number of Features to consider at split', options=['auto', 'sqrt', 'log2'],
index=0)
max_leaf_nodes = st.number_input(label='Enter Number of Leaf Nodes', min_value=3, max_value=None)
if st.checkbox(label='See The Model Result'):
dec_tree_clf = DecisionTreeClassifier(criterion=criterion, random_state=44, max_depth=max_depth,
max_features=max_features, max_leaf_nodes=max_leaf_nodes)
clf = dec_tree_clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
# noinspection PyPep8Naming,PyTypeChecker
def random_forest_classification(df):
X_train, X_test, y_train, y_test = df_split(df)
n_estimators = st.number_input(label='Enter Number of Estimator (Integer)', min_value=10, max_value=None)
criterion = st.selectbox(label='Select the split criteria', options=['gini', 'entropy'], index=0)
max_depth = st.number_input(label='Enter Depth of Tree (Integer)', min_value=1, max_value=None)
max_features = st.selectbox(label='Number of Features to consider at split', options=['auto', 'sqrt', 'log2'],
index=0)
max_leaf_nodes = st.number_input(label='Enter Number of leaf Nodes', min_value=3, max_value=None)
if st.checkbox(label='See The Model Result'):
randforclf = RandomForestClassifier(n_estimators=n_estimators, criterion=criterion, max_depth=max_depth,
max_features=max_features, max_leaf_nodes=max_leaf_nodes, random_state=44)
clf = randforclf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
# noinspection PyPep8Naming,PyTypeChecker
def support_vector_classification(df):
X_train, X_test, y_train, y_test = df_split(df)
C = st.slider("Select the Value of C", 1, 10)
kernel = st.selectbox(label='Select Kernel', options=['linear', 'poly', 'rbf', 'sigmoid', 'precomputed'], index=2)
gamma = st.selectbox(label=' Select Kernel coefficient for Poly, rbf and sigmoid', options=['scale', 'auto'],
index=0)
degree_check_box = st.checkbox(label='If Kernel is Poly Select Degree of Polynomial')
degree = 3
if degree_check_box:
degree = st.number_input(label='Enter the Degree of Polynomial', min_value=1, max_value=None)
degree = int(degree)
if st.checkbox(label='See The Model Result'):
svc = SVC(C=C, degree=degree, kernel=kernel, gamma=gamma, probability=True)
clf = svc.fit(X_train, y_train)
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
if st.checkbox(label='See The Model Result'):
svc = SVC(C=C, degree=degree, kernel=kernel, gamma=gamma, probability=True)
clf = svc.fit(X_train, y_train)
y_pred = clf.predict(X_test)
classification_eval(clf=clf, X_test=X_test, y_train=y_train, y_test=y_test, y_pred=y_pred)
def model(df):
st.header('Choose Model Specifications')
problemtype = st.sidebar.selectbox(label='Select Problem Type', options=['Regression', 'Classification'])
if problemtype == 'Regression':
methodlist = st.sidebar.selectbox(label='Select Algorithm', options=['Linear Regression',
'KNN Regression',
'lasso Regression',
'Ridge Regression',
'Random Forest Regression',
'Support Vector Regression',
'Decision Tree Regression'],
key='regressmethod')
if methodlist == 'Linear Regression':
linear_reg(df)
elif methodlist == 'KNN Regression':
knn_reg(df)
elif methodlist == 'lasso Regression':
lasso_reg(df)
elif methodlist == 'Ridge Regression':
ridge_reg(df)
elif methodlist == 'Random Forest Regression':
random_forest_reg(df)
elif methodlist == 'Support Vector Regression':
support_vector_reg(df)
else:
decision_tree_reg(df)
else:
methodlist = st.sidebar.selectbox(label='Select Algorithm', options=['KNN Classification',
'Logistic Regression',
'Decision Tree Classification',
'Random Forest Classification',
'Support Vector Classification'],
key='classificationmethod')
if methodlist == 'Logistic Regression':
log_reg(df)
elif methodlist == 'KNN Classification':
knn_classification(df)
elif methodlist == 'Decision Tree Classification':
decision_tree_classification(df)
elif methodlist == 'Random Forest Classification':
random_forest_classification(df)
else:
support_vector_classification(df)
def visualisation(df):
x_axis = st.selectbox(label='Select Column X-Axis', options=col_name, key='x_axis')
y_axis = st.selectbox(label='Select Column Y-Axis', options=col_name, key='y_axis')
color = st.selectbox(label='Select Categorical Column', options=col_name, key='color')
chart_type = st.sidebar.selectbox(label='Select Chart Type', options=['Pair Plot',
'Scatter Plot',
'Line Chart',
'Pie Chart',
'Strip Plot',
'Violin Plot',
'Histogram',
'Distribution Plot',
'Sunburst Chart',
'Box Plot'], index=1)
if chart_type == 'Pair Plot':
fig1 = ff.create_scatterplotmatrix(df, diag='histogram', height=800, width=800)
st.plotly_chart(fig1)
fig2 = ff.create_scatterplotmatrix(df, index=color, diag='box', height=800, width=800, colormap_type='cat')
st.plotly_chart(fig2)
elif chart_type == 'Scatter Plot':
st.header(f'{x_axis} vs {y_axis}')
fig = px.scatter(df, x=x_axis, y=y_axis)
st.plotly_chart(fig)
st.header(f'{x_axis} vs {y_axis} and legends are {color} columns value')
fig1 = px.scatter(df, x=x_axis, y=y_axis, color=color, hover_data=df)
st.plotly_chart(fig1)
elif chart_type == 'Line Chart':
st.header(f'{x_axis} vs {y_axis}')
fig = px.line(df, x=x_axis, y=y_axis, hover_data=df)
st.plotly_chart(fig)
st.header(f'{x_axis} vs {y_axis} and legends are {color} columns value')
fig1 = go.Figure()
for color, groupdf in df.groupby(color):
fig1.add_trace(go.Scatter(x=groupdf[x_axis], y=groupdf[y_axis], name=color, mode='markers'))
st.plotly_chart(fig1)
elif chart_type == 'Pie Chart':
st.header(f'Pie Chart of {color} column')
fig = px.pie(df, names=df[color])
st.plotly_chart(fig)
st.header(f'Donut Chart of {color} column')
fig1 = px.pie(df, names=df[color], hole=0.3)
st.plotly_chart(fig1)
elif chart_type == 'Strip Plot':
st.header(f'{x_axis} vs {y_axis}')
fig = px.strip(df, x=df[x_axis], y=df[y_axis])
st.plotly_chart(fig)
st.header(f'{x_axis} vs {y_axis} and legends are {color} columns value')
fig1 = px.strip(df, x=df[x_axis], y=df[y_axis], color=df[color])
st.plotly_chart(fig1)
elif chart_type == 'Violin Plot':
st.header(f'{x_axis} vs {y_axis}')
fig = px.violin(df, x=df[x_axis], y=df[y_axis], points='all')
st.plotly_chart(fig)
st.header(f'{x_axis} vs {y_axis} and legends are {color} columns value')
fig1 = px.violin(df, x=df[x_axis], y=df[y_axis], color=df[color], points='all')
st.plotly_chart(fig1)
elif chart_type == 'Histogram':
fig = px.histogram(df, x=df[x_axis])
st.plotly_chart(fig)
if st.checkbox(label='Y-Axis is Sum'):
fig1 = px.histogram(df, x=df[x_axis], y=df[y_axis], histfunc='sum')
st.plotly_chart(fig1)
fig2 = px.histogram(df, x=df[x_axis], y=df[x_axis], color=df[color], histfunc='sum')
st.plotly_chart(fig2)
if st.checkbox(label='Y-Axis is Count'):
fig3 = px.histogram(df, x=df[x_axis], y=df[y_axis], histfunc='count')
st.plotly_chart(fig3)
fig4 = px.histogram(df, x=df[x_axis], y=df[x_axis], color=df[color], histfunc='count')
st.plotly_chart(fig4)
if st.checkbox(label='Y-Axis is Average'):
fig5 = px.histogram(df, x=df[x_axis], y=df[y_axis], histfunc='avg')
st.plotly_chart(fig5)
fig6 = px.histogram(df, x=df[x_axis], y=df[x_axis], color=df[color], histfunc='avg')
st.plotly_chart(fig6)
elif chart_type == 'Sunburst Chart':
path = st.multiselect(label='Select The Path', options=df.columns)
fig = px.sunburst(df, path=path, color=color, values=x_axis)
st.plotly_chart(fig)
elif chart_type == 'Box Plot':
fig = px.box(df, x=df[x_axis], y=df[y_axis], points='all`')
st.plotly_chart(fig)
fig1 = px.box(df, x=df[x_axis], y=df[y_axis], points='all', color=df[color])
st.plotly_chart(fig1)
else:
fig1 = px.histogram(df, x=df[x_axis], marginal="box")
st.plotly_chart(fig1)
fig2 = px.histogram(df, x=df[x_axis], y=df[y_axis], marginal="box")
st.plotly_chart(fig2)
fig3 = px.histogram(df, x=df[x_axis], y=df[y_axis], color=df[color], marginal="box")
st.plotly_chart(fig3)
def main():
if side_bar == 'EDA':
eda(uploaded_file)
elif side_bar == 'Modeling':
model(uploaded_file)
elif side_bar == 'Visualisation':
visualisation(uploaded_file)
if __name__ == '__main__':
file = st.file_uploader("Upload a CSV file", type="csv")
side_bar = st.sidebar.selectbox(label='What do you want to do?', options=['EDA', 'Visualisation', 'Modeling'])
if file is not None:
uploaded_file = upload(file)
col_name = uploaded_file.columns
if st.checkbox(label='View Dataset'):
DataFrame = st.dataframe(uploaded_file)
main()