# Disable Hosted inference API

**URL:** <https://discuss.huggingface.co/t/disable-hosted-inference-api/10379>\
**Category:** 🤗Hub\
**Created:** [September 29, 2021, 8:18am UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379 "2021-09-29T08:18:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cattana](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@cattana](https://discuss.huggingface.co/u/cattana)\
**Post date:** [September 29, 2021, 8:18am UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379/1 "2021-09-29T08:18:46Z")

</div>

Hi,

How can I disable the hosted inference API for my model in HF?

Thanks

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](https://discuss.huggingface.co/u/BramVanroy)\
**Post date:** [September 29, 2021, 1:48pm UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379/2 "2021-09-29T13:48:30Z")

</div>

I don’t know if you can. Out of curiosity, what is your use-case that you do not want that the widget? If you want to private models you’ll need to get a paid subscription AFAIK.

---

<div class="post-metadata">

**Author:** ![cattana](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@cattana](https://discuss.huggingface.co/u/cattana)\
**Post date:** [September 29, 2021, 2:19pm UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379/3 "2021-09-29T14:19:59Z")

</div>

I’d like to disable the widget because the example is misleading.

My model is a text classification model on scientific papers [allenai/longformer-scico · Hugging Face](https://huggingface.co/allenai/longformer-scico) while the example is `I like you. I love you`. Also, my model uses global attention for some tokens and there is no way to add preprocessing in the widget.

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 30, 2021, 9:49am UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379/4 "2021-09-30T09:49:29Z")

</div>

Hi,

Yes you can disable it, or you change the default text that is in there.

To disable it, you can add the following to the top of the README:

```auto
---
inference: false
---

```

To change the default text, you can add the following to the README:

```auto
---
widget:
- text: 'hello this is an example'
---

```

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 30, 2021, 10:05am UTC](https://discuss.huggingface.co/t/disable-hosted-inference-api/10379/5 "2021-09-30T10:05:58Z")

</div>

Note: this can be found in the documentation of the hub: [Model Repos docs](https://huggingface.co/docs/hub/model-repos#when-sharing-a-model-what-should-i-add-to-my-model-card)
