This commit is contained in:
cristhianzl 2024-06-03 15:49:51 -03:00
commit 9d033c9e34
157 changed files with 6860 additions and 5525 deletions

View file

@ -0,0 +1,16 @@
import os
from huggingface_hub import HfApi, list_models
from rich import print
# Use root method
models = list_models()
# Or configure a HfApi client
hf_api = HfApi(
endpoint="https://huggingface.co", # Can be a Private Hub endpoint.
token=os.getenv("HUGGINFACE_API_TOKEN"),
)
space_runtime = hf_api.restart_space("Langflow/Langflow-Preview", factory_reboot=True)
print(space_runtime)