Syntrex commited on
Commit
043f906
·
verified ·
1 Parent(s): b17d20a

Update visualization/game_cards.py

Browse files
Files changed (1) hide show
  1. visualization/game_cards.py +5 -5
visualization/game_cards.py CHANGED
@@ -140,13 +140,13 @@ def render_game_card(game: dict[str, Any]) -> None:
140
  is_live_game = any(token in status_lower for token in ["live", "top", "bot", "bottom", "mid"])
141
  is_final_game = "final" in status_lower
142
 
 
 
 
 
143
  pitch_html = ""
144
  if is_live_game or is_final_game or last_pitch or pitch_type or pitch_velocity:
145
- velo_text = f"{pitch_velocity} mph" if pitch_velocity else "—"
146
- spin_text = f"{pitch_spin_rate} rpm" if pitch_spin_rate else "—"
147
- ext_text = f"{pitch_extension} ft" if pitch_extension else "—"
148
-
149
- pitch_html = f"""
150
  <div style="display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px;">
151
  <div>
152
  <div style="color:#94a3b8;font-size:12px;font-weight:700;margin-bottom:2px;">LAST PITCH</div>
 
140
  is_live_game = any(token in status_lower for token in ["live", "top", "bot", "bottom", "mid"])
141
  is_final_game = "final" in status_lower
142
 
143
+ velo_text = f"{pitch_velocity} mph" if pitch_velocity else "—"
144
+ spin_text = f"{pitch_spin_rate} rpm" if pitch_spin_rate else "—"
145
+ ext_text = f"{pitch_extension} ft" if pitch_extension else "—"
146
+
147
  pitch_html = ""
148
  if is_live_game or is_final_game or last_pitch or pitch_type or pitch_velocity:
149
+ pitch_html = f"""
 
 
 
 
150
  <div style="display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px;">
151
  <div>
152
  <div style="color:#94a3b8;font-size:12px;font-weight:700;margin-bottom:2px;">LAST PITCH</div>