File size: 304 Bytes
117c7e8
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import huggingface_hub
from huggingface_hub import create_branch

#get user variables
repo = input("Repository name: ")
branch = input("New branch name: ")

#login
huggingface_hub.login(os.environ['HF_TOKEN'])

#create the branch
create_branch(f"{repo}", repo_type="model", branch=f"{branch}")