devingulliver commited on
Commit
00e3be0
β€’
1 Parent(s): 2c89b38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -15,12 +15,13 @@ archlinks = {
15
  "StripedHyena": "https://www.together.ai/blog/stripedhyena-7b", # no paper?
16
  }
17
 
18
- def filter_table(cols, name, type, arch):
19
  tmp = data
20
  # filter
21
  tmp = tmp[tmp["Name"].str.contains(name)]
22
  tmp = tmp[tmp["Type"].isin(type)]
23
  tmp = tmp[tmp["Architecture"].isin(arch)]
 
24
  # prettify
25
  tmp["Type"] = tmp["Type"].apply(lambda x: x[0])
26
  tmp = tmp.rename({"Type": "T"}, axis=1)
@@ -68,18 +69,19 @@ with gr.Blocks(css=".tab-buttons button{font-size:1.3em}") as demo:
68
 
69
  with gr.Column():
70
  archfilter = gr.CheckboxGroup(label="Filter by model architecture", choices=list(data["Architecture"].unique()), value=list(data["Architecture"].unique()))
 
71
 
72
  with gr.Column():
73
- colfilter = gr.CheckboxGroup(label="Hide columns", choices=list(data.columns)[2:], value=["MT-Bench (coming soon!)","Architecture","Base Model"])
74
 
75
- table = gr.Dataframe(filter_table(["MT-Bench (coming soon!)","Architecture","Base Model"],"",[n for n in data["Type"].unique() if n not in ["βŒ› Pending"]],list(data["Architecture"].unique())), datatype="markdown")
76
 
77
  # actions
78
 
79
- namefilter.submit(filter_table, [colfilter,namefilter,typefilter,archfilter], table)
80
 
81
- for filter in [colfilter,typefilter,archfilter]:
82
- filter.input(filter_table, [colfilter,namefilter,typefilter,archfilter], table)
83
 
84
  with gr.Tab("πŸ“ About"):
85
  gr.Markdown("""
 
15
  "StripedHyena": "https://www.together.ai/blog/stripedhyena-7b", # no paper?
16
  }
17
 
18
+ def filter_table(cols, name, type, arch, size):
19
  tmp = data
20
  # filter
21
  tmp = tmp[tmp["Name"].str.contains(name)]
22
  tmp = tmp[tmp["Type"].isin(type)]
23
  tmp = tmp[tmp["Architecture"].isin(arch)]
24
+ tmp = tmp[tmp["Model Size"].isin(size)]
25
  # prettify
26
  tmp["Type"] = tmp["Type"].apply(lambda x: x[0])
27
  tmp = tmp.rename({"Type": "T"}, axis=1)
 
69
 
70
  with gr.Column():
71
  archfilter = gr.CheckboxGroup(label="Filter by model architecture", choices=list(data["Architecture"].unique()), value=list(data["Architecture"].unique()))
72
+ sizefilter = gr.CheckboxGroup(label="Filter by model size", choices=list(data["Model Size"].unique()), value=list(data["Model Size"].unique()))
73
 
74
  with gr.Column():
75
+ colfilter = gr.CheckboxGroup(label="Hide columns", choices=list(data.columns)[2:], value=["MT-Bench (coming soon!)","Architecture","Model Size","Base Model"])
76
 
77
+ table = gr.Dataframe(filter_table(["MT-Bench (coming soon!)","Architecture","Model Size","Base Model"],"",[n for n in data["Type"].unique() if n not in ["βŒ› Pending"]],list(data["Architecture"].unique()),list(data["Model Size"].unique())), datatype="markdown")
78
 
79
  # actions
80
 
81
+ namefilter.submit(filter_table, [colfilter,namefilter,typefilter,archfilter,sizefilter], table)
82
 
83
+ for filter in [colfilter,typefilter,archfilter,sizefilter]:
84
+ filter.input(filter_table, [colfilter,namefilter,typefilter,archfilter,sizefilter], table)
85
 
86
  with gr.Tab("πŸ“ About"):
87
  gr.Markdown("""