ser4ff commited on
Commit
a1f136f
1 Parent(s): 30ce977

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- local_plot = shap.plots.text(shap_values[0], display=False, color="BuRd")
 
 
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])