File size: 561 Bytes
f7795d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")