hlnicholls commited on
Commit
7b8d8e0
1 Parent(s): be15263

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -67,9 +67,9 @@ if len(gene_list) > 1:
67
  st.dataframe(df)
68
  df.drop(columns='XGB_Score', inplace=True)
69
  shap_values = explainer.shap_values(df)
70
- summary_plot = shap.summary_plot(shap_values, df)
71
  st.caption("SHAP Summary Plot of All Input Genes")
72
- components.html(summary_plot, height = output_height, width = output_width, scrolling = True)
73
 
74
  else:
75
  pass
@@ -85,8 +85,9 @@ if len(input_gene) == 1:
85
  force_plot = shap.force_plot(
86
  explainer.expected_value,
87
  shap_values.values,
88
- df2)
89
- components.html(force_plot, height = output_height, width = output_width, scrolling = True)
 
90
  else:
91
  pass
92
 
 
67
  st.dataframe(df)
68
  df.drop(columns='XGB_Score', inplace=True)
69
  shap_values = explainer.shap_values(df)
70
+ summary_plot = shap.summary_plot(shap_values, df, display = False)
71
  st.caption("SHAP Summary Plot of All Input Genes")
72
+ components.html(summary_plot, scrolling = True)
73
 
74
  else:
75
  pass
 
85
  force_plot = shap.force_plot(
86
  explainer.expected_value,
87
  shap_values.values,
88
+ df2,
89
+ display = False)
90
+ components.html(force_plot, scrolling = True)
91
  else:
92
  pass
93