zero / model_upload
rahul7star's picture
Create model_upload
f7795d7 verified
raw
history blame contribute delete
561 Bytes
from huggingface_hub import login
from transformers import AutoModelForCausalLM, AutoTokenizer
# Login to your Hugging Face account
login(token="add api token")
# Load the fine-tuned model and tokenizer
model = AutoModelForCausalLM.from_pretrained("/kaggle/working/finetuned_model")
tokenizer = AutoTokenizer.from_pretrained("/kaggle/working/finetuned_tokenizer")
# Replace 'your-username/finetuned-model' with your Hugging Face username and desired model name
model.push_to_hub("rahul7star/zero-ai-model")
tokenizer.push_to_hub("rahul7star/zero-ai-model")