Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudhanshu-Ambastha authored Apr 2, 2024
1 parent c5fa552 commit 109f129
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Streamlit app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def predict_diabetes(symptoms, features, svm_classifier, scaler):
# Load data
if selected == "🩸 Diabetes Prediction" or selected == "❤️ Heart Disease Prediction":
# Load data for diabetes and heart disease prediction
diabetes_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\combined-disease-prediction-test\\Streamlit app\\diabetes.csv') # Update with your diabetes dataset path
heart_disease_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\combined-disease-prediction-test\\Streamlit app\\heart.csv') # Update with your heart disease dataset path
diabetes_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\Poly-Disease-Predictor\\Streamlit app\\diabetes.csv') # Update with your diabetes dataset path
heart_disease_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\Poly-Disease-Predictor\\Streamlit app\\heart.csv') # Update with your heart disease dataset path

# Training SVM model for diabetes prediction
X_diabetes = diabetes_data.drop(columns='Outcome', axis=1)
Expand All @@ -78,8 +78,8 @@ def predict_diabetes(symptoms, features, svm_classifier, scaler):
st.title("Multiple Disease Prediction using Symptoms")

# Load data for multiple disease prediction
train_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\combined-disease-prediction-test\\Streamlit app\\Training.csv')
test_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\combined-disease-prediction-test\\Streamlit app\\Testing.csv')
train_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\Poly-Disease-Predictor\\Streamlit app\\Training.csv')
test_data = pd.read_csv('C:\\Users\\sudha\\OneDrive\\Documents\\GitHub\\Poly-Disease-Predictor\\Streamlit app\\Testing.csv')

# Split data into features and target variable
features = train_data.drop('prognosis', axis=1)
Expand Down Expand Up @@ -150,4 +150,4 @@ def predict_diabetes(symptoms, features, svm_classifier, scaler):
[[age_heart, sex_heart, cp_heart, trestbps_heart, chol_heart, fbs_heart, restecg_heart, thalach_heart, exang_heart, oldpeak_heart, slope_heart, ca_heart, thal_heart]]
)
heart_diagnosis = "The person is having heart disease" if heart_prediction[0] == 1 else "The person does not have any heart disease"
st.success(heart_diagnosis)
st.success(heart_diagnosis)

0 comments on commit 109f129

Please sign in to comment.