Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,10 @@ def adr_predict(x):
|
|
61 |
# # Plot the SHAP values for a specific instance in your dataset (e.g., instance 0)
|
62 |
# shap.plots.text(shap_values[label_1_index][0])
|
63 |
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
|
67 |
# med = med_score(classifier(x+str(", There is a medication."))[0])
|
68 |
# sym = sym_score(classifier(x+str(", There is a symptom."))[0])
|
|
|
61 |
# # Plot the SHAP values for a specific instance in your dataset (e.g., instance 0)
|
62 |
# shap.plots.text(shap_values[label_1_index][0])
|
63 |
|
64 |
+
#Set the colors for the labels
|
65 |
+
label_colors = ["green", "red"]
|
66 |
+
|
67 |
+
local_plot = shap.plots.text(shap_values[0], display=False, color=label_colors)
|
68 |
|
69 |
# med = med_score(classifier(x+str(", There is a medication."))[0])
|
70 |
# sym = sym_score(classifier(x+str(", There is a symptom."))[0])
|