Spaces:
Sleeping
Sleeping
paragon-analytics
commited on
Commit
•
c35e70a
1
Parent(s):
b335787
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def adr_predict(x):
|
|
43 |
shap_values = explainer([str(x).lower()])
|
44 |
local_plot = shap.plots.text(shap_values[0], display=False)
|
45 |
|
46 |
-
med = med_score(classifier(x+str("There is a medication."))[0])
|
47 |
|
48 |
return {"Severe Reaction": float(scores.numpy()[1]), "Non-severe Reaction": float(scores.numpy()[0])}, local_plot, {"Contains Medication": float(med), "No Medications": float(1-med)}
|
49 |
|
|
|
43 |
shap_values = explainer([str(x).lower()])
|
44 |
local_plot = shap.plots.text(shap_values[0], display=False)
|
45 |
|
46 |
+
med = med_score(classifier(x+str(", There is a medication."))[0])
|
47 |
|
48 |
return {"Severe Reaction": float(scores.numpy()[1]), "Non-severe Reaction": float(scores.numpy()[0])}, local_plot, {"Contains Medication": float(med), "No Medications": float(1-med)}
|
49 |
|