Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ def predict_diabetes_func(Pregnancies, Glucose, BloodPressure, SkinThickness, In
|
|
16 |
input_data = [Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age]
|
17 |
input_df = pd.DataFrame([input_data], columns=columns)
|
18 |
prediction = diabetes_classifier.predict(input_df)
|
19 |
-
return Pregnancies
|
20 |
-
|
21 |
|
22 |
iface = gr.Interface( title = "Mashdemy AI Demo _Diabetes Prediction App",
|
23 |
description = "Enter the various parameters and click submit to know if the result is Positive or Negative",
|
|
|
16 |
input_data = [Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age]
|
17 |
input_df = pd.DataFrame([input_data], columns=columns)
|
18 |
prediction = diabetes_classifier.predict(input_df)
|
19 |
+
# return Pregnancies
|
20 |
+
return "Positive" if prediction[0] == 1 else "Negative"
|
21 |
|
22 |
iface = gr.Interface( title = "Mashdemy AI Demo _Diabetes Prediction App",
|
23 |
description = "Enter the various parameters and click submit to know if the result is Positive or Negative",
|