Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def _render_force_plot(base_val: float, shap_1d: np.ndarray, feat_1d: np.ndarray
|
|
57 |
matplotlib=True, show=False
|
58 |
)
|
59 |
fig = plt.gcf()
|
60 |
-
fig.set_size_inches(
|
61 |
plt.tight_layout()
|
62 |
return fig
|
63 |
|
@@ -161,9 +161,9 @@ def predict_and_explain(ALB, TP, TBA, AST_ALT, CREA, LYM, ALP, nsamples=200):
|
|
161 |
return None, None, f"Fatal error: {repr(e)}"
|
162 |
|
163 |
# ====== 示例输入(仅 7 项 + nsamples)======
|
164 |
-
example_values = [
|
165 |
-
|
166 |
-
|
167 |
|
168 |
# ====== Gradio 界面 ======
|
169 |
with gr.Blocks() as demo:
|
|
|
57 |
matplotlib=True, show=False
|
58 |
)
|
59 |
fig = plt.gcf()
|
60 |
+
fig.set_size_inches(10, 4)
|
61 |
plt.tight_layout()
|
62 |
return fig
|
63 |
|
|
|
161 |
return None, None, f"Fatal error: {repr(e)}"
|
162 |
|
163 |
# ====== 示例输入(仅 7 项 + nsamples)======
|
164 |
+
example_values = [36.4, 57.7, 3.7, 1.0, 74.7, 2.14, 69, 200]
|
165 |
+
|
166 |
+
|
167 |
|
168 |
# ====== Gradio 界面 ======
|
169 |
with gr.Blocks() as demo:
|