bndl commited on
Commit
b6995e3
·
1 Parent(s): e0aa30b

Update template_gradio_interface.py

Browse files
Files changed (1) hide show
  1. template_gradio_interface.py +3 -2
template_gradio_interface.py CHANGED
@@ -58,8 +58,8 @@ def call_predict(inference_dict, cols_order):
58
  shap.summary_plot(shap_values[0], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
59
  plt.subplot(1,2,2)
60
  shap.summary_plot(shap_values[1], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
61
- plt.subplot(1,2,3)
62
- shap.summary_plot(shap_values[2], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
63
  plt.tight_layout()
64
  plt.subplots_adjust(wspace=2.0)
65
  fig = plt.gcf()
@@ -67,6 +67,7 @@ def call_predict(inference_dict, cols_order):
67
  print("mmmmmmmmmmmmmmmmmmmmm")
68
  print(y_pred_rescaled.shape)
69
  return y_pred_rescaled[0][0], 10, y_pred_rescaled[0][1], 10, y_pred_rescaled[0][2], 10, fig
 
70
 
71
  return lambda *x: predict_from_list(x)
72
 
 
58
  shap.summary_plot(shap_values[0], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
59
  plt.subplot(1,2,2)
60
  shap.summary_plot(shap_values[1], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
61
+ # plt.subplot(1,2,3)
62
+ # shap.summary_plot(shap_values[2], df_preprocessed, show=False, feature_names=df_preprocessed.columns, plot_size=(15, 15))
63
  plt.tight_layout()
64
  plt.subplots_adjust(wspace=2.0)
65
  fig = plt.gcf()
 
67
  print("mmmmmmmmmmmmmmmmmmmmm")
68
  print(y_pred_rescaled.shape)
69
  return y_pred_rescaled[0][0], 10, y_pred_rescaled[0][1], 10, y_pred_rescaled[0][2], 10, fig
70
+ return y_pred_rescaled[0][0], 10, y_pred_rescaled[0][1], 10, fig
71
 
72
  return lambda *x: predict_from_list(x)
73