Anas Awadalla commited on
Commit
305d1af
Β·
1 Parent(s): 1d20349

less updates

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +8 -1
src/streamlit_app.py CHANGED
@@ -55,7 +55,7 @@ BASELINES = {
55
  }
56
  }
57
 
58
- @st.cache_data(ttl=300) # Cache for 5 minutes
59
  def fetch_leaderboard_data():
60
  """Fetch all grounding results from HuggingFace leaderboard by streaming JSON files."""
61
  api = HfApi()
@@ -388,6 +388,13 @@ def main():
388
  st.title("🎯 Grounding Benchmark Leaderboard")
389
  st.markdown("Visualization of model performance on grounding benchmarks")
390
 
 
 
 
 
 
 
 
391
  # Fetch data
392
  with st.spinner("Loading leaderboard data..."):
393
  df = fetch_leaderboard_data()
 
55
  }
56
  }
57
 
58
+ @st.cache_data() # Cache without TTL - manual refresh only
59
  def fetch_leaderboard_data():
60
  """Fetch all grounding results from HuggingFace leaderboard by streaming JSON files."""
61
  api = HfApi()
 
388
  st.title("🎯 Grounding Benchmark Leaderboard")
389
  st.markdown("Visualization of model performance on grounding benchmarks")
390
 
391
+ # Add refresh button
392
+ col1, col2 = st.columns([1, 5])
393
+ with col1:
394
+ if st.button("πŸ”„ Refresh", help="Refresh leaderboard data from HuggingFace"):
395
+ st.cache_data.clear()
396
+ st.rerun()
397
+
398
  # Fetch data
399
  with st.spinner("Loading leaderboard data..."):
400
  df = fetch_leaderboard_data()