Spaces:
Runtime error
Runtime error
Fix lingering issues from CheckboxGroup refactor
Browse files
app.py
CHANGED
|
@@ -9,16 +9,10 @@ webhook_url = os.environ.get("WEBHOOK_URL")
|
|
| 9 |
|
| 10 |
def filter_table(name, type, arch, license):
|
| 11 |
tmp = data
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
tmp = tmp[tmp["Type"].isin(type)]
|
| 17 |
-
if arch:
|
| 18 |
-
tmp = tmp[tmp["Architecture"].isin(arch)]
|
| 19 |
-
if license:
|
| 20 |
-
tmp = tmp[tmp["License"].isin(license)]
|
| 21 |
-
|
| 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 |
return tmp
|
| 24 |
|
|
|
|
| 9 |
|
| 10 |
def filter_table(name, type, arch, license):
|
| 11 |
tmp = data
|
| 12 |
+
tmp = tmp[tmp["Name"].str.contains(name)]
|
| 13 |
+
tmp = tmp[tmp["Type"].isin(type)]
|
| 14 |
+
tmp = tmp[tmp["Architecture"].isin(arch)]
|
| 15 |
+
tmp = tmp[tmp["License"].isin(license)]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
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>')
|
| 17 |
return tmp
|
| 18 |
|