Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def calculate_pages(df, items_per_page):
|
|
18 |
|
19 |
|
20 |
# Function to get model info from Hugging Face API using caching
|
21 |
-
@st.
|
22 |
def cached_model_info(api, model):
|
23 |
try:
|
24 |
return api.model_info(repo_id=str(model))
|
@@ -26,7 +26,7 @@ def cached_model_info(api, model):
|
|
26 |
return None
|
27 |
|
28 |
# Function to get model info from DataFrame and update it with likes and tags
|
29 |
-
@st.
|
30 |
def get_model_info(df):
|
31 |
api = HfApi()
|
32 |
|
@@ -67,7 +67,7 @@ def convert_markdown_table_to_dataframe(md_content):
|
|
67 |
|
68 |
return df
|
69 |
|
70 |
-
@st.
|
71 |
def get_model_info(df):
|
72 |
api = HfApi()
|
73 |
|
|
|
18 |
|
19 |
|
20 |
# Function to get model info from Hugging Face API using caching
|
21 |
+
@st.cache_data
|
22 |
def cached_model_info(api, model):
|
23 |
try:
|
24 |
return api.model_info(repo_id=str(model))
|
|
|
26 |
return None
|
27 |
|
28 |
# Function to get model info from DataFrame and update it with likes and tags
|
29 |
+
@st.cache_data
|
30 |
def get_model_info(df):
|
31 |
api = HfApi()
|
32 |
|
|
|
67 |
|
68 |
return df
|
69 |
|
70 |
+
@st.cache_data
|
71 |
def get_model_info(df):
|
72 |
api = HfApi()
|
73 |
|