Update app.py
Browse files
app.py
CHANGED
@@ -13,13 +13,15 @@ CITATION_BIB_TEXT = """
|
|
13 |
}
|
14 |
"""
|
15 |
|
|
|
16 |
def fetch_readme_content():
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
return response.text
|
21 |
-
|
22 |
-
st.error("Failed to fetch README.md content
|
23 |
return ""
|
24 |
|
25 |
class SearchApplication:
|
|
|
13 |
}
|
14 |
"""
|
15 |
|
16 |
+
@st.cache_data(ttl=3600) # Cache the data for 1 hour
|
17 |
def fetch_readme_content():
|
18 |
+
try:
|
19 |
+
url = "https://raw.githubusercontent.com/SAILResearch/awesome-foundation-model-leaderboards/main/README.md"
|
20 |
+
response = requests.get(url, timeout=10)
|
21 |
+
response.raise_for_status() # Raises HTTPError for bad responses
|
22 |
return response.text
|
23 |
+
except requests.exceptions.RequestException as e:
|
24 |
+
st.error(f"Failed to fetch README.md content: {e}")
|
25 |
return ""
|
26 |
|
27 |
class SearchApplication:
|