Spaces:
Sleeping
Sleeping
Commit
·
fd9b0ed
1
Parent(s):
bce365b
Test 2
Browse files
app.py
CHANGED
|
@@ -4,9 +4,12 @@ import pandas as pd
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
import datetime
|
|
|
|
| 7 |
from utils import fetch_competition_summary, fetch_models_evaluation
|
| 8 |
|
| 9 |
st.set_page_config(layout="wide")
|
|
|
|
|
|
|
| 10 |
|
| 11 |
### WANDB
|
| 12 |
|
|
@@ -139,9 +142,14 @@ def main():
|
|
| 139 |
cols[6].write(leader_info.get("Hotkey", "N/A"))
|
| 140 |
cols[7].write(leader_info.get("Days on Top", "N/A"))
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
competition_name = query_params
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
st.write(f"Selected competition: {competition_name}")
|
| 146 |
competition_details = projects.get(competition_name, {})
|
| 147 |
description = competition_details.get("description", "No description available.")
|
|
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
import datetime
|
| 7 |
+
import pkg_resources
|
| 8 |
from utils import fetch_competition_summary, fetch_models_evaluation
|
| 9 |
|
| 10 |
st.set_page_config(layout="wide")
|
| 11 |
+
streamlit_version = pkg_resources.get_distribution("streamlit").version
|
| 12 |
+
print(f"Streamlit version: {streamlit_version}")
|
| 13 |
|
| 14 |
### WANDB
|
| 15 |
|
|
|
|
| 142 |
cols[6].write(leader_info.get("Hotkey", "N/A"))
|
| 143 |
cols[7].write(leader_info.get("Days on Top", "N/A"))
|
| 144 |
|
| 145 |
+
if hasattr(st, 'query_params'):
|
| 146 |
+
query_params = st.query_params
|
| 147 |
+
competition_name = query_params.get("comp")
|
| 148 |
+
else:
|
| 149 |
+
# Fallback for older Streamlit versions
|
| 150 |
+
competition_name = st.selectbox("Select a competition", list(projects.keys()))
|
| 151 |
+
|
| 152 |
+
if competition_name:
|
| 153 |
st.write(f"Selected competition: {competition_name}")
|
| 154 |
competition_details = projects.get(competition_name, {})
|
| 155 |
description = competition_details.get("description", "No description available.")
|