Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi, ModelFilter, list_models
|
3 |
api = HfApi()
|
4 |
-
|
5 |
-
# List all models
|
6 |
-
filt = ModelFilter(task="text-classification")
|
7 |
-
|
8 |
-
this = api.list_models(limit=100,filter=filt,cardData=True)
|
9 |
-
for i,mod in enumerate(this):
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi, ModelFilter, list_models
|
3 |
api = HfApi()
|
4 |
+
def model_explorer():
|
5 |
+
# List all models
|
6 |
+
filt = ModelFilter(task="text-classification")
|
7 |
+
|
8 |
+
this = api.list_models(limit=100,filter=filt,cardData=True)
|
9 |
+
for i,mod in enumerate(this):
|
10 |
+
print(dir(mod))
|
11 |
+
print(mod.id)
|
12 |
+
print(mod.downloads)
|
13 |
+
print(mod.likes)
|
14 |
+
print(mod.pipeline_tag)
|
15 |
+
return out
|