File size: 616 Bytes
55de6fa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
from huggingface_hub import HfApi
api = HfApi()
model_id = "Stefan171/TinyLlama-QuantumQuill-chat-12-05-24"
# Path to the safetensors model file
safetensors_path = "./model.safetensors"
# Upload the safetensors model
api.upload_file(
path_or_fileobj=safetensors_path,
path_in_repo="model.safetensors",
repo_id=model_id,
repo_type="model"
)
# Path to the tokenizer folder (current directory)
tokenizer_path = "./"
# Upload the tokenizer files
api.upload_folder(
folder_path=tokenizer_path,
path_in_repo="tokenizer",
repo_id=model_id,
repo_type="model"
)
|