devingulliver
commited on
Commit
•
6ab6442
1
Parent(s):
f23a45f
Make UI roomier
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def filter_table(name, type, arch, license):
|
|
13 |
tmp = tmp[tmp["Type"].isin(type)]
|
14 |
tmp = tmp[tmp["Architecture"].isin(arch)]
|
15 |
tmp = tmp[tmp["License"].isin(license)]
|
16 |
-
tmp = tmp.rename({"Type": "T"})
|
17 |
tmp["T"] = tmp["T"].apply(lambda x: x[0])
|
18 |
tmp["Name"] = tmp["Name"].apply(lambda x: f'<a target="_blank" href="https://huggingface.co/{x}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{x}</a>')
|
19 |
return tmp
|
@@ -49,8 +49,9 @@ with gr.Blocks() as demo:
|
|
49 |
with gr.Row():
|
50 |
namefilter = model_name = gr.Textbox(max_lines=1, label="Search by model name and hit Enter")
|
51 |
typefilter = gr.CheckboxGroup(label="Filter by model type", choices=list(data["Type"].unique()), value=[n for n in data["Type"].unique() if n not in ["Pending"]])
|
52 |
-
|
53 |
-
|
|
|
54 |
|
55 |
table = gr.Dataframe(datatype="markdown")
|
56 |
|
|
|
13 |
tmp = tmp[tmp["Type"].isin(type)]
|
14 |
tmp = tmp[tmp["Architecture"].isin(arch)]
|
15 |
tmp = tmp[tmp["License"].isin(license)]
|
16 |
+
tmp = tmp.rename({"Type": "T"}, axis=1)
|
17 |
tmp["T"] = tmp["T"].apply(lambda x: x[0])
|
18 |
tmp["Name"] = tmp["Name"].apply(lambda x: f'<a target="_blank" href="https://huggingface.co/{x}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{x}</a>')
|
19 |
return tmp
|
|
|
49 |
with gr.Row():
|
50 |
namefilter = model_name = gr.Textbox(max_lines=1, label="Search by model name and hit Enter")
|
51 |
typefilter = gr.CheckboxGroup(label="Filter by model type", choices=list(data["Type"].unique()), value=[n for n in data["Type"].unique() if n not in ["Pending"]])
|
52 |
+
with gr.Column():
|
53 |
+
archfilter = gr.CheckboxGroup(label="Filter by model architecture", choices=list(data["Architecture"].unique()), value=list(data["Architecture"].unique()))
|
54 |
+
lcnsfilter = gr.CheckboxGroup(label="Filter by model license", choices=list(data["License"].unique()), value=list(data["License"].unique()))
|
55 |
|
56 |
table = gr.Dataframe(datatype="markdown")
|
57 |
|