Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,10 @@ model = joblib.load(model_path)
|
|
14 |
# Update predict function to handle new parameters
|
15 |
def predict(age, sex, cp, trestbps, chol, fbs, restecg, thalach, exang, oldpeak, slope, ca, thal):
|
16 |
# Create a dataframe with the input data
|
17 |
-
|
|
|
|
|
|
|
18 |
'age': [age],
|
19 |
'sex': [sex],
|
20 |
'cp': [cp],
|
@@ -29,7 +32,7 @@ def predict(age, sex, cp, trestbps, chol, fbs, restecg, thalach, exang, oldpeak,
|
|
29 |
'ca': [ca],
|
30 |
'thal': [thal]
|
31 |
})
|
32 |
-
|
33 |
# Process input data using the pipeline
|
34 |
X_processed = pipeline.transform(input_df)
|
35 |
|
|
|
14 |
# Update predict function to handle new parameters
|
15 |
def predict(age, sex, cp, trestbps, chol, fbs, restecg, thalach, exang, oldpeak, slope, ca, thal):
|
16 |
# Create a dataframe with the input data
|
17 |
+
|
18 |
+
input_df = pd.read_csv("heart.csv")
|
19 |
+
'''
|
20 |
+
input_df = pd.DataFrame({
|
21 |
'age': [age],
|
22 |
'sex': [sex],
|
23 |
'cp': [cp],
|
|
|
32 |
'ca': [ca],
|
33 |
'thal': [thal]
|
34 |
})
|
35 |
+
'''
|
36 |
# Process input data using the pipeline
|
37 |
X_processed = pipeline.transform(input_df)
|
38 |
|