Spaces:
Build error
Build error
Commit
·
2ee34f5
1
Parent(s):
0ea5a61
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,9 +17,6 @@ for symptom in options:
|
|
| 17 |
# Create a DataFrame from the dictionary
|
| 18 |
X = pd.DataFrame([symptoms_dict], columns=column_list)
|
| 19 |
|
| 20 |
-
st.write('Generated DataFrame:')
|
| 21 |
-
st.write(X)
|
| 22 |
-
|
| 23 |
if st.button("Submit"):
|
| 24 |
# Unpickle classifier
|
| 25 |
clf = joblib.load("self_diagnose_model.pkl")
|
|
@@ -30,13 +27,6 @@ if st.button("Submit"):
|
|
| 30 |
|
| 31 |
st.write("Predicted Disease: " + prediction)
|
| 32 |
|
| 33 |
-
# You can also display the top N predicted classes with their probabilities
|
| 34 |
-
top_n = 5 # Change this value to display more or fewer top classes
|
| 35 |
-
top_n_classes = np.argsort(-confidence_scores)[:top_n]
|
| 36 |
-
st.text("Top {} Predicted Diseases:".format(top_n))
|
| 37 |
-
for i, class_idx in enumerate(top_n_classes):
|
| 38 |
-
st.text(f"{clf.classes_[class_idx]}: {confidence_scores[class_idx]:.2f}")
|
| 39 |
-
|
| 40 |
|
| 41 |
|
| 42 |
|
|
|
|
| 17 |
# Create a DataFrame from the dictionary
|
| 18 |
X = pd.DataFrame([symptoms_dict], columns=column_list)
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
if st.button("Submit"):
|
| 21 |
# Unpickle classifier
|
| 22 |
clf = joblib.load("self_diagnose_model.pkl")
|
|
|
|
| 27 |
|
| 28 |
st.write("Predicted Disease: " + prediction)
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
|