File size: 418 Bytes
463c2c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
from dotenv import load_dotenv
from huggingface_hub import login, HfApi

# Load the Hugging Face token from .env
load_dotenv()
hf_token = os.getenv("HUGGINGFACE_TOKEN")

# Log in to Hugging Face
login(token=hf_token)

# Define your repository ID
repo_id = "IsmatS/gpt-wiki-az"

# Initialize HfApi and upload the model folder
api = HfApi()
api.upload_folder(folder_path="./", path_in_repo="", repo_id=repo_id)