Spaces:
Runtime error
Runtime error
fix layout size
Browse files
app.py
CHANGED
@@ -148,13 +148,13 @@ with gr.Blocks() as demo:
|
|
148 |
feature_names=["age", "bmi", "hba1c", "glucose"],
|
149 |
)
|
150 |
|
151 |
-
fig2 = plt.figure(figsize=(3,
|
152 |
fig2.tight_layout()
|
153 |
plt.gca().set_position((0, 0, 1, 1))
|
154 |
plt.title("SHAP Waterfall Plot") # Optionally set a title for the SHAP plot
|
155 |
plt.tight_layout()
|
156 |
# plt.xticks(rotation=90)
|
157 |
-
plt.yticks(rotation=45)
|
158 |
plt.tick_params(axis="y", labelsize=3)
|
159 |
shap.waterfall_plot(
|
160 |
shap_explanation
|
|
|
148 |
feature_names=["age", "bmi", "hba1c", "glucose"],
|
149 |
)
|
150 |
|
151 |
+
fig2 = plt.figure(figsize=(3, 3)) # Create a new figure for SHAP plot
|
152 |
fig2.tight_layout()
|
153 |
plt.gca().set_position((0, 0, 1, 1))
|
154 |
plt.title("SHAP Waterfall Plot") # Optionally set a title for the SHAP plot
|
155 |
plt.tight_layout()
|
156 |
# plt.xticks(rotation=90)
|
157 |
+
# plt.yticks(rotation=45)
|
158 |
plt.tick_params(axis="y", labelsize=3)
|
159 |
shap.waterfall_plot(
|
160 |
shap_explanation
|