merge
This commit is contained in:
parent
999ce405c4
commit
9d033c9e34
157 changed files with 6860 additions and 5525 deletions
16
scripts/factory_restart_space.py
Normal file
16
scripts/factory_restart_space.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue