Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,6 +28,12 @@ def visualize_data(df):
|
|
| 28 |
report = df.profile_report()
|
| 29 |
spp(report)
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
def model_info(model,type_of_model):
|
| 32 |
st.markdown("## Your Model Report")
|
| 33 |
st.subheader("We've tried different models for you with its efficiency determining metrics")
|
|
@@ -452,9 +458,9 @@ if data is not None:
|
|
| 452 |
if select_ == 'Visualize':
|
| 453 |
visualize_data(df)
|
| 454 |
if select_ == 'Preprocess':
|
| 455 |
-
|
| 456 |
if select_ == 'Model Report':
|
| 457 |
-
model_info(reg,
|
| 458 |
|
| 459 |
|
| 460 |
|
|
|
|
| 28 |
report = df.profile_report()
|
| 29 |
spp(report)
|
| 30 |
|
| 31 |
+
def reg_class(df,target):
|
| 32 |
+
if df[target].nunique() > 6:
|
| 33 |
+
return "regression"
|
| 34 |
+
else :
|
| 35 |
+
return "classification"
|
| 36 |
+
|
| 37 |
def model_info(model,type_of_model):
|
| 38 |
st.markdown("## Your Model Report")
|
| 39 |
st.subheader("We've tried different models for you with its efficiency determining metrics")
|
|
|
|
| 458 |
if select_ == 'Visualize':
|
| 459 |
visualize_data(df)
|
| 460 |
if select_ == 'Preprocess':
|
| 461 |
+
preprocess_data(df,target)
|
| 462 |
if select_ == 'Model Report':
|
| 463 |
+
model_info(reg,reg_class(df,target))
|
| 464 |
|
| 465 |
|
| 466 |
|