# Pushing Model through CLI

**URL:** <https://discuss.huggingface.co/t/pushing-model-through-cli/50960>\
**Category:** Beginners\
**Created:** [August 16, 2023, 12:47pm UTC](https://discuss.huggingface.co/t/pushing-model-through-cli/50960 "2023-08-16T12:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakshit122](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@Rakshit122](https://discuss.huggingface.co/u/Rakshit122)\
**Post date:** [August 16, 2023, 12:47pm UTC](https://discuss.huggingface.co/t/pushing-model-through-cli/50960/1 "2023-08-16T12:47:41Z")

</div>

Hello everyone, I am using this code below to push my local model to the hub:

```auto
from transformers import AutoModel, AutoTokenizer

def push_model_and_tokenizer_to_hub(local_model_directory, hub_model_id, api_token):
    model = AutoModel.from_pretrained(local_model_directory)
    tokenizer = AutoTokenizer.from_pretrained(local_model_directory)
    
    # Push tokenizer to Hub
    tokenizer.push_to_hub(
        repo_id=hub_model_id,
        use_auth_token=api_token,
    )
    
    # Push model to Hub
    model.push_to_hub(
        repo_id=hub_model_id,
        use_auth_token=api_token,
    )

local_model_directory = r"C:\Users\raksh\Desktop\LANGTEST\langtest\roberta"
hub_model_id = "test1"
api_token = "hf_NsWAxxxxxxxxxxxxxxxxxxxx"

push_model_and_tokenizer_to_hub(local_model_directory, hub_model_id, api_token)

```

The model files are pushing : Link → [Rakshit122/test1 · Hugging Face](https://huggingface.co/Rakshit122/test1)

But if i make a sample prediction on Hosted inference API, It is showing me embedding matrix, not the actual binary prediction

Can anyone tell what i am doing wrong here?
