Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,13 @@ import gradio as gr
|
|
| 7 |
data = pd.read_csv("data.csv", dtype="str")
|
| 8 |
webhook_url = os.environ.get("WEBHOOK_URL")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
def filter_table(cols, name, type, arch, license):
|
| 11 |
tmp = data
|
| 12 |
# filter
|
|
@@ -14,14 +21,16 @@ def filter_table(cols, name, type, arch, license):
|
|
| 14 |
tmp = tmp[tmp["Type"].isin(type)]
|
| 15 |
tmp = tmp[tmp["Architecture"].isin(arch)]
|
| 16 |
tmp = tmp[tmp["License"].isin(license)]
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
return tmp
|
| 26 |
|
| 27 |
def submit_model(name):
|
|
|
|
| 7 |
data = pd.read_csv("data.csv", dtype="str")
|
| 8 |
webhook_url = os.environ.get("WEBHOOK_URL")
|
| 9 |
|
| 10 |
+
archlinks = {
|
| 11 |
+
"Mamba": "https://arxiv.org/abs/2312.00752",
|
| 12 |
+
"RWKV-4": "https://arxiv.org/abs/2305.13048",
|
| 13 |
+
"RWKV-5": "https://x.com/BlinkDL_AI/status/1685230712247795713", # paper soon:tm:
|
| 14 |
+
"StripedHyena": "https://www.together.ai/blog/stripedhyena-7b" # this is very confusing
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
def filter_table(cols, name, type, arch, license):
|
| 18 |
tmp = data
|
| 19 |
# filter
|
|
|
|
| 21 |
tmp = tmp[tmp["Type"].isin(type)]
|
| 22 |
tmp = tmp[tmp["Architecture"].isin(arch)]
|
| 23 |
tmp = tmp[tmp["License"].isin(license)]
|
|
|
|
|
|
|
| 24 |
# prettify
|
| 25 |
tmp["Type"] = tmp["Type"].apply(lambda x: x[0])
|
| 26 |
tmp = tmp.rename({"Type": "T"}, axis=1)
|
| 27 |
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>')
|
| 28 |
+
tmp["Architecture"] = tmp["Architecture"].apply(lambda x: f'<a target="_blank" href="{archlinks[x]}" style="color:var(--link-text-color);text-decoration:underline;text-decoration-style:dotted">{x}</a>')
|
| 29 |
+
tmp["License"] = tmp["License"].apply(lambda x: f'<a target="_blank" href="https://choosealicense.com/licenses/{x}" style="color:var(--link-text-color);text-decoration:underline;text-decoration-style:dotted">{x}</a>')
|
| 30 |
+
tmp["Base Model"] = tmp["Base Model"].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>' if x != "base" else x)
|
| 31 |
+
# show/hide
|
| 32 |
+
tmp = tmp.drop(cols, axis=1)
|
| 33 |
+
# done!
|
| 34 |
return tmp
|
| 35 |
|
| 36 |
def submit_model(name):
|