davanstrien HF staff commited on
Commit
6224220
1 Parent(s): 4072c1c

sort by likes

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -111,6 +111,7 @@ def prep_dataframe(remove_orgs_and_users=remove_orgs, columns_to_drop=columns_to
111
  df["id"] = df["id"].apply(render_model_hub_link)
112
  if columns_to_drop:
113
  df = df.drop(columns=columns_to_drop)
 
114
  return df
115
 
116
 
@@ -147,7 +148,7 @@ def filter_df_by_max_age(max_age_days=None):
147
  if max_age_days is not None:
148
  max_date = now - timedelta(days=max_age_days)
149
  df = df[df["created"] >= max_date]
150
-
151
  return df
152
 
153
 
 
111
  df["id"] = df["id"].apply(render_model_hub_link)
112
  if columns_to_drop:
113
  df = df.drop(columns=columns_to_drop)
114
+ df = df.sort_values(by="created", ascending=False)
115
  return df
116
 
117
 
 
148
  if max_age_days is not None:
149
  max_date = now - timedelta(days=max_age_days)
150
  df = df[df["created"] >= max_date]
151
+ df = df.sort_values(by="created", ascending=False)
152
  return df
153
 
154