Megalino111 commited on
Commit
f9aa2a3
·
1 Parent(s): 7222f99

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import HfApi, list_models
2
+
3
+ # Use root method
4
+ models = list_models()
5
+
6
+ # Or configure a HfApi client
7
+ hf_api = HfApi(
8
+ endpoint="https://huggingface.co", # Can be a Private Hub endpoint.
9
+ token="hf_xxx", # Token is not persisted on the machine.
10
+ )
11
+ models = hf_api.list_models()