Skip to content

Commit

Permalink
Merge pull request #24 from Dv04/Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dv04 authored Aug 26, 2023
2 parents 697cd3d + e838384 commit 4f1a2e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 6 additions & 1 deletion forms.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, PasswordField, SelectField, IntegerField, TextAreaField, RadioField
from wtforms.validators import DataRequired
from Disease import list_column_names

column_names = list_column_names("dataset/Training.csv")
class DiseaseDetailsForm(FlaskForm):
pass
name = StringField("Name", validators=[DataRequired()])
disease_list = SelectField("Disease", choices=[(column_name, column_name) for column_name in column_names])
submit = SubmitField("Submit")

class PatientDetailsForm(FlaskForm):

pass

class LoginUserForm(FlaskForm):
Expand Down
Empty file added templates/camera.html
Empty file.
7 changes: 1 addition & 6 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
plt.figure(figsize = (18,8))
sns.barplot(x = "Disease", y = "Counts", data = temp_df)
plt.xticks(rotation=90)
plt.show()

# Encoding the target value into numerical
# value using LabelEncoder
Expand Down Expand Up @@ -77,7 +76,6 @@ def cv_scoring(estimator, X, y):
plt.figure(figsize=(12,8))
sns.heatmap(cf_matrix, annot=True)
plt.title("Confusion Matrix for SVM Classifier on Test Data")
plt.show()

# Training and testing Naive Bayes Classifier
nb_model = GaussianNB()
Expand All @@ -92,7 +90,6 @@ def cv_scoring(estimator, X, y):
plt.figure(figsize=(12,8))
sns.heatmap(cf_matrix, annot=True)
plt.title("Confusion Matrix for Naive Bayes Classifier on Test Data")
plt.show()

# Training and testing Random Forest Classifier
rf_model = RandomForestClassifier(random_state=18)
Expand All @@ -108,7 +105,6 @@ def cv_scoring(estimator, X, y):
plt.figure(figsize=(12,8))
sns.heatmap(cf_matrix, annot=True)
plt.title("Confusion Matrix for Random Forest Classifier on Test Data")
plt.show()

# Training the models on whole data
final_svm_model = SVC()
Expand Down Expand Up @@ -141,7 +137,6 @@ def cv_scoring(estimator, X, y):

sns.heatmap(cf_matrix, annot = True)
plt.title("Confusion Matrix for Combined Model on Test Dataset")
plt.show()

symptoms = X.columns.values

Expand Down Expand Up @@ -189,5 +184,5 @@ def predictDisease(symptoms):
return predictions

# Testing the function
print(predictDisease("Itching,Skin Rash,Nodal Skin Eruptions"))
print(predictDisease("Blister,Red Sore Around Nose,Yellow Crust Ooze"))

0 comments on commit 4f1a2e5

Please sign in to comment.