Spaces:
Sleeping
Sleeping
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") |