rsm-roguchi commited on
Commit
e97c60d
·
1 Parent(s): c5c0f3e

Fix infinite startup and cluster side labeling

Browse files
Files changed (4) hide show
  1. app.py +1 -0
  2. requirements.txt +1 -0
  3. src/data.py +1 -0
  4. src/tags.py +1 -0
app.py CHANGED
@@ -192,3 +192,4 @@ with tab3:
192
  st.markdown(f"#### {row['pitch_type']} comps")
193
  comps = nearest_comps(row, df_fit, scaler, nn, within_pitch_type=True, k=6)
194
  st.dataframe(comps, use_container_width=True)
 
 
192
  st.markdown(f"#### {row['pitch_type']} comps")
193
  comps = nearest_comps(row, df_fit, scaler, nn, within_pitch_type=True, k=6)
194
  st.dataframe(comps, use_container_width=True)
195
+
requirements.txt CHANGED
@@ -5,3 +5,4 @@ plotly==5.24.1
5
  scikit-learn==1.5.1
6
  pyarrow==16.1.0
7
  huggingface_hub==0.25.2
 
 
5
  scikit-learn==1.5.1
6
  pyarrow==16.1.0
7
  huggingface_hub==0.25.2
8
+
src/data.py CHANGED
@@ -26,3 +26,4 @@ def load_statcast(start_date: str, end_date: str, force: bool = False) -> pd.Dat
26
  df = df[df["pitch_type"].notna()]
27
  df.to_parquet(cp, index=False)
28
  return df
 
 
26
  df = df[df["pitch_type"].notna()]
27
  df.to_parquet(cp, index=False)
28
  return df
29
+
src/tags.py CHANGED
@@ -159,3 +159,4 @@ def xy_cluster_tags(df_with_clusters: pd.DataFrame) -> dict[int, str]:
159
  tags[c] = f"{dom_pt}: {shape} • " + " / ".join(flavor)
160
 
161
  return tags
 
 
159
  tags[c] = f"{dom_pt}: {shape} • " + " / ".join(flavor)
160
 
161
  return tags
162
+