Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,8 @@ MODEL_FALLBACKS = [MODELS_DIR / "model.joblib", MODELS_DIR / "model.pkl"]
|
|
| 25 |
COLORS = {"pred": "#1f77b4", "actual": "#f2b702", "ref": "#5a5a5a"}
|
| 26 |
|
| 27 |
# ---- Plot sizing controls ----
|
| 28 |
-
CROSS_W =
|
| 29 |
-
CROSS_H =
|
| 30 |
TRACK_H = 1000 # px (plotly height; width auto-fits column)
|
| 31 |
# NEW: Add a TRACK_W variable to control the width
|
| 32 |
TRACK_W = 500 # px (plotly width)
|
|
@@ -263,9 +263,9 @@ def cross_plot_static(actual, pred):
|
|
| 263 |
ax.xaxis.set_major_formatter(fmt)
|
| 264 |
ax.yaxis.set_major_formatter(fmt)
|
| 265 |
|
| 266 |
-
ax.set_xlabel("Actual UCS (psi)", fontweight="bold", fontsize=
|
| 267 |
-
ax.set_ylabel("Predicted UCS (psi)", fontweight="bold", fontsize=
|
| 268 |
-
ax.tick_params(labelsize=
|
| 269 |
|
| 270 |
ax.grid(True, linestyle=":", alpha=0.3)
|
| 271 |
for spine in ax.spines.values():
|
|
|
|
| 25 |
COLORS = {"pred": "#1f77b4", "actual": "#f2b702", "ref": "#5a5a5a"}
|
| 26 |
|
| 27 |
# ---- Plot sizing controls ----
|
| 28 |
+
CROSS_W = 400 # px (matplotlib figure size; Streamlit will still scale)
|
| 29 |
+
CROSS_H = 400
|
| 30 |
TRACK_H = 1000 # px (plotly height; width auto-fits column)
|
| 31 |
# NEW: Add a TRACK_W variable to control the width
|
| 32 |
TRACK_W = 500 # px (plotly width)
|
|
|
|
| 263 |
ax.xaxis.set_major_formatter(fmt)
|
| 264 |
ax.yaxis.set_major_formatter(fmt)
|
| 265 |
|
| 266 |
+
ax.set_xlabel("Actual UCS (psi)", fontweight="bold", fontsize=12, color="black")
|
| 267 |
+
ax.set_ylabel("Predicted UCS (psi)", fontweight="bold", fontsize=12, color="black")
|
| 268 |
+
ax.tick_params(labelsize=8, colors="black")
|
| 269 |
|
| 270 |
ax.grid(True, linestyle=":", alpha=0.3)
|
| 271 |
for spine in ax.spines.values():
|