Weyaxi commited on
Commit
42aed68
·
verified ·
1 Parent(s): 43dc029

fix column name for author name and make the df search bar under the users and ors selection thing

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -512,7 +512,7 @@ def search_bar_in_df_fn(search_text):
512
  lists_to_return = []
513
 
514
  for df in dfs:
515
- lists_to_return.append(df[df['👤 Author'].str.contains(f'"https://huggingface.co/{search_text}"', case=False, na=False)])
516
  return lists_to_return
517
 
518
 
@@ -520,9 +520,6 @@ with gr.Blocks() as demo:
520
  gr.Markdown("""<h1 align="center" id="space-title">🤗 Huggingface Leaderboard</h1>""")
521
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
522
 
523
- with gr.Column(min_width=320):
524
- search_bar_in_df = gr.Textbox(placeholder="🔍 Search for a author", show_label=False)
525
-
526
  all_models = get_models("models")
527
  all_datasets = get_models("datasets")
528
  all_spaces = get_models("spaces")
@@ -532,6 +529,9 @@ with gr.Blocks() as demo:
532
  orgs = gr.Checkbox(value=True, label="Show Organizations", interactive=True)
533
  users = gr.Checkbox(value=True, label="Show users", interactive=True)
534
 
 
 
 
535
  with gr.TabItem("🏛️ Models", id=1):
536
  columns_to_convert = ["Author Name", "Best Model On Open LLM Leaderboard", "Most Downloaded Model",
537
  "Most Liked Model", "Trending Model"]
 
512
  lists_to_return = []
513
 
514
  for df in dfs:
515
+ lists_to_return.append(df[df['👤 Author Name'].str.contains(f'"https://huggingface.co/{search_text}"', case=False, na=False)])
516
  return lists_to_return
517
 
518
 
 
520
  gr.Markdown("""<h1 align="center" id="space-title">🤗 Huggingface Leaderboard</h1>""")
521
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
522
 
 
 
 
523
  all_models = get_models("models")
524
  all_datasets = get_models("datasets")
525
  all_spaces = get_models("spaces")
 
529
  orgs = gr.Checkbox(value=True, label="Show Organizations", interactive=True)
530
  users = gr.Checkbox(value=True, label="Show users", interactive=True)
531
 
532
+ with gr.Column(min_width=320):
533
+ search_bar_in_df = gr.Textbox(placeholder="🔍 Search for a author", show_label=False)
534
+
535
  with gr.TabItem("🏛️ Models", id=1):
536
  columns_to_convert = ["Author Name", "Best Model On Open LLM Leaderboard", "Most Downloaded Model",
537
  "Most Liked Model", "Trending Model"]