algorythmtechnologies's picture
Upload folder using huggingface_hub
7900b06 verified
import os
from huggingface_hub import HfApi
# Get the token from the environment instead of hard-coding it
TOKEN = os.environ.get("HF_TOKEN")
REPO_ID = "algorythmtechnologies/Warren-8B-Uncensored"
LOCAL_DIR = os.getcwd()
if not TOKEN:
raise ValueError("Please set the HF_TOKEN environment variable!")
api = HfApi()
api.upload_folder(
folder_path=LOCAL_DIR,
repo_id=REPO_ID,
repo_type="model",
token=TOKEN
)