Omnibus commited on
Commit
b43a77a
·
1 Parent(s): 85e2714

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
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
- print(dir(mod))
11
- print(mod.id)
12
- print(mod.downloads)
13
- print(mod.likes)
14
- print(mod.pipeline_tag)
 
 
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