Here is an end-to-end example to create and setup a Space on the Hub.  
**1. Create a Space on the Hub.**  
```py
>>> from huggingface_hub import HfApi
>>> repo_id = "Wauplin/my-cool-training-space"
>>> api = HfApi()