devingulliver
commited on
Commit
•
06e8c2c
1
Parent(s):
904f959
Attempt to fix datatype hiccup
Browse files
app.py
CHANGED
@@ -17,12 +17,9 @@ def filter_table(cols, name, type, arch, license):
|
|
17 |
# show/hide
|
18 |
tmp = tmp.drop(cols, axis=1)
|
19 |
# prettify
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
if "Name" in tmp:
|
25 |
-
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>')
|
26 |
|
27 |
return tmp
|
28 |
|
@@ -64,9 +61,9 @@ with gr.Blocks() as demo:
|
|
64 |
lcnsfilter = gr.CheckboxGroup(label="Filter by model license", choices=list(data["License"].unique()), value=list(data["License"].unique()))
|
65 |
|
66 |
with gr.Column():
|
67 |
-
colfilter = gr.CheckboxGroup(label="Hide columns", choices=list(data.columns))
|
68 |
|
69 |
-
table = gr.Dataframe(datatype=["str","markdown","number","number","number","number","number","number","number","
|
70 |
|
71 |
# actions
|
72 |
|
|
|
17 |
# show/hide
|
18 |
tmp = tmp.drop(cols, axis=1)
|
19 |
# prettify
|
20 |
+
tmp["Type"] = tmp["Type"].apply(lambda x: x[0])
|
21 |
+
tmp = tmp.rename({"Type": "T"}, axis=1)
|
22 |
+
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>')
|
|
|
|
|
|
|
23 |
|
24 |
return tmp
|
25 |
|
|
|
61 |
lcnsfilter = gr.CheckboxGroup(label="Filter by model license", choices=list(data["License"].unique()), value=list(data["License"].unique()))
|
62 |
|
63 |
with gr.Column():
|
64 |
+
colfilter = gr.CheckboxGroup(label="Hide columns", choices=list(data.columns)[2:])
|
65 |
|
66 |
+
table = gr.Dataframe(datatype=["str","markdown","number","number","number","number","number","number","number","number","number"])
|
67 |
|
68 |
# actions
|
69 |
|