Update app.py
Browse files
app.py
CHANGED
|
@@ -286,10 +286,14 @@ def compare_live_vs_season(live_per, live_totals, season_per, season_totals):
|
|
| 286 |
|
| 287 |
# ===== Savant predictive metrics (savantfunctions) =====
|
| 288 |
try:
|
| 289 |
-
|
|
|
|
| 290 |
HAVE_SAVANT = True
|
| 291 |
except Exception:
|
| 292 |
-
|
|
|
|
|
|
|
|
|
|
| 293 |
|
| 294 |
|
| 295 |
def _pick_first(paths):
|
|
|
|
| 286 |
|
| 287 |
# ===== Savant predictive metrics (savantfunctions) =====
|
| 288 |
try:
|
| 289 |
+
# Use functions that actually exist in savantfunctions.py
|
| 290 |
+
from savantfunctions import load_metrics, list_feature_columns, compute_correlations, METRICS
|
| 291 |
HAVE_SAVANT = True
|
| 292 |
except Exception:
|
| 293 |
+
HAVE_SAVANT = False
|
| 294 |
+
load_metrics = list_feature_columns = compute_correlations = None
|
| 295 |
+
METRICS = ("whiff_pct","strike_pct","chase_pct","exit_velo","fb_velo")
|
| 296 |
+
|
| 297 |
|
| 298 |
|
| 299 |
def _pick_first(paths):
|