# Push\_to\_hub() makes Inference Endpoint not working

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpush-to-hub-makes-inference-endpoint-not-working%2F29272%3E%5C
**Category:** Inference Endpoints on the Hub\
**Created:** [January 10, 2023, 5:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpush-to-hub-makes-inference-endpoint-not-working%2F29272 "2023-01-10T05:14:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bananaspectre](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bananaspectre](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbananaspectre)%5C
**Post date:** [January 10, 2023, 5:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpush-to-hub-makes-inference-endpoint-not-working%2F29272%2F1 "2023-01-10T05:14:47Z")

</div>

There’s no progress bar or any indication when using the `push_to_hub` callback in keras/tensorflow- making it kind of a pain.

To mitigate this, I used `model.push_to_hub() and tokenizer.push_to_hub()` after training.

But for some reason, after uploading to the hub, the API gives me an `Internal Server Error`. Yet somehow, using the `Trainer API` does not give me this problem. Furthermore, the `Trainer API` correctly determines the task (translation) and the former classifies it as a `Text2TextGeneration` (using the same model checkpoint).

So how do I properly upload my model to the hub using tensorflow/keras? I’m not sure where I am doing wrong here but for more information, I was just following this notebook [translation-tf](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/translation-tf.ipynb#scrollTo=SE7nh2o0Fvl5) on my own colab file.

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fphilschmid)%5C
**Post date:** [January 16, 2023, 8:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpush-to-hub-makes-inference-endpoint-not-working%2F29272%2F2 "2023-01-16T08:35:10Z")

</div>

This seems to be unrelated to inference endpoint, Would open a thread in the #beginners section?
