devingulliver commited on
Commit
83d1755
Β·
verified Β·
1 Parent(s): 87a3a74

Attempt to get rid of button

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -47,17 +47,17 @@ with gr.Blocks() as demo:
47
 
48
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
49
  with gr.Tab("πŸ… LLM Benchmark"):
50
- with gr.Group():
51
- with gr.Row():
52
- namefilter = model_name = gr.Textbox(max_lines=1, placeholder="Search by model name...", show_label=False, scale=3)
53
- typefilter = gr.Dropdown(label="Filter by model type", multiselect=True, choices=list(set(data["Type"])), value=["Base","Chat"], scale=2)
54
- archfilter = gr.Dropdown(label="Filter by model architecture", multiselect=True, choices=list(set(data["Architecture"])), scale=2)
55
- lcnsfilter = gr.Dropdown(label="Filter by model license", multiselect=True, choices=list(set(data["License"])), scale=2)
56
- filter = gr.Button("Filter", scale=0)
57
 
58
- table = gr.Dataframe(filter_table("",["Base","Chat"],[],[]))
59
 
60
- filter.click(fn=filter_table, inputs=[namefilter,typefilter,archfilter,lcnsfilter], outputs=table)
 
 
61
 
62
  with gr.Tab("πŸ“ About"):
63
  gr.Markdown("""
 
47
 
48
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
49
  with gr.Tab("πŸ… LLM Benchmark"):
50
+ with gr.Row():
51
+ namefilter = model_name = gr.Textbox(max_lines=1, label="Search by model name")
52
+ typefilter = gr.Dropdown(label="Filter by model type", multiselect=True, choices=list(set(data["Type"])), value=["Base","Chat"])
53
+ archfilter = gr.Dropdown(label="Filter by model architecture", multiselect=True, choices=list(set(data["Architecture"])), value=list(set(data["Architecture"])))
54
+ lcnsfilter = gr.Dropdown(label="Filter by model license", multiselect=True, choices=list(set(data["License"])), value=list(set(data["License"])))
 
 
55
 
56
+ table = gr.Dataframe(filter_table(namefilter,typefilter,archfilter,lcnsfilter))
57
 
58
+ namefilter.submit(filter_table, [namefilter,typefilter,archfilter,lcnsfilter], table)
59
+ for filter in [typefilter, archfilter, lcnsfilter]:
60
+ filter.input(filter_table, [namefilter,typefilter,archfilter,lcnsfilter], table)
61
 
62
  with gr.Tab("πŸ“ About"):
63
  gr.Markdown("""