# How to connect Inference Endpoint to Model Card

**URL:** <https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294>\
**Category:** Inference Endpoints on the Hub\
**Created:** [October 16, 2024, 12:44am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294 "2024-10-16T00:44:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fzmnm](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fzmnm](https://discuss.huggingface.co/u/fzmnm)\
**Post date:** [October 16, 2024, 12:44am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/1 "2024-10-16T00:44:35Z")

</div>

I want to demonstrate my model by enabling the widget on the model card.  
However, it says “This model does not have enough activity to be deployed to Inference API (serverless) yet.”  
After I purchased the " Inference Endpoints (dedicated)," and succeed set up the inference API, the widget on the model card is still disabled.  
Are there any way to enable the example widget on the model card?  
Thanks

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 16, 2024, 12:50am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/2 "2024-10-16T00:50:32Z")

</div>

The widget practically doesn’t work anymore…

> [@Inference API turned off ? Why?](https://discuss.huggingface.co/t/inference-api-turned-off-why/97126/):
>
> Whay the inference API are turned off ?

---

<div class="post-metadata">

**Author:** ![fzmnm](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fzmnm](https://discuss.huggingface.co/u/fzmnm)\
**Post date:** [October 16, 2024, 1:13am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/3 "2024-10-16T01:13:32Z")

</div>

The sad point is even i paid for the dedicated inference server. I am still unable to restore the inference widget.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 16, 2024, 1:44am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/4 "2024-10-16T01:44:01Z")

</div>

Yeah… even if you charge for it, it won’t be valid…

@meganariley @not-lain Serverless Inference API issue, but it seems to be a payment issue as well.

---

<div class="post-metadata">

**Author:** ![fzmnm](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fzmnm](https://discuss.huggingface.co/u/fzmnm)\
**Post date:** [October 16, 2024, 2:33am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/5 "2024-10-16T02:33:08Z")

</div>

Am I supposed to use “HF Space” instead? I’m trying to figure out how to create a gradio app and make it work on the space. unfortunately, the demo code don’t work with paid inference endpoint.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 16, 2024, 3:49am UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/6 "2024-10-16T03:49:33Z")

</div>

That would certainly be the quickest way to do it.

This is almost joke software, but it is a simple Demo to assist in creating a Demo space.  
It can be used for more than just T2I.

> **[Gradio Demo Space creation helper V2 - a Hugging Face Space by John6666](https://huggingface.co/spaces/John6666/t2i-demo-helper)**
>
> Discover amazing ML apps made by the community

If the model you are going to use is a well-known model, someone else may have already published a high-performance space.

> **[Spaces for LLM / VLM / NLP - a John6666 Collection](https://huggingface.co/collections/John6666/spaces-for-llm-vlm-nlp-66999a0f61278f96d85256f4)**
>
> Unlock the magic of AI with handpicked models, awesome datasets, papers, and mind-blowing Spaces from John6666

> **[Spaces for Text-to-images (SDXL, Pony, SD1.5, Flux,...) - a John6666 Collection](https://huggingface.co/collections/John6666/spaces-for-text-to-images-sdxl-pony-sd15-flux-666129d4aa688f92ce5cd563)**
>
> Unlock the magic of AI with handpicked models, awesome datasets, papers, and mind-blowing Spaces from John6666

---

<div class="post-metadata">

**Author:** ![meganariley](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/meganariley/32/56966_2.png) [@meganariley](https://discuss.huggingface.co/u/meganariley)\
**Post date:** [October 16, 2024, 2:05pm UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/7 "2024-10-16T14:05:12Z")

</div>

Hi @fzmnm The Inference API is a free service for the community to test models directly in the browser or via HTTP requests. It uses shared resources and is not available for every model. For production or latency/availability sensitive use cases, we recommend using [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/index) instead, which will allow you to easily deploy your models on dedicated, fully-managed infrastructure. Inference Endpoints gives you the flexibility to quickly create endpoints on CPU or GPU resources, and is billed by compute uptime vs character usage. Further pricing information can be found [here](https://huggingface.co/docs/inference-endpoints/pricing).

Please let me know if you have additional questions.

---

<div class="post-metadata">

**Author:** ![fzmnm](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fzmnm](https://discuss.huggingface.co/u/fzmnm)\
**Post date:** [October 16, 2024, 4:45pm UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/8 "2024-10-16T16:45:11Z")

</div>

Thank you very much for your resources.

My user case is that I want to share my homebrew small language models to my friends. It is a very small language model (92M) so it can run on a potato computer.

Currently, I successfully hosted it on the virtual machine dedicated for Space. The solution is very like the gradio app generator you provided. I use the free version of instance. Since it is a potato model so the free tier can handle it.

However, I’m still unable to connect the inference in gradio. i also try developing it locally. maybe I should see the endpoint forum for a good tutorial. but right now the vCPU of Space is enough for my potato model.

best,

---

<div class="post-metadata">

**Author:** ![fzmnm](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fzmnm](https://discuss.huggingface.co/u/fzmnm)\
**Post date:** [October 16, 2024, 4:47pm UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/9 "2024-10-16T16:47:18Z")

</div>

Dear Ariley:  
I have two questions:

1. can I wire the Inference Endpoint I **purchased** to the Inference API, so people can test my model on the model card page?
2. If I’m encouraged to use Spaces, how to wire Inference Endpoint to the Gradio app. The example HF provided does not work for the Inference Endpoint I purchased.  
Best.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 16, 2024, 10:08pm UTC](https://discuss.huggingface.co/t/how-to-connect-inference-endpoint-to-model-card/112294/10 "2024-10-16T22:08:48Z")

</div>

> However, I’m still unable to connect the inference in gradio

If Spaces were set to **Private** , it would have been virtually impossible to use the Gradio space from the outside. It might be possible to do so by scraping using a virtual browser, but it would be too much of a hassle.  
In **Public** settings should normally be accessible locally, but it would be faster to search this forum or github for know-how. There are many local rules that you have to search to find out.  
You might also ask meganariley.
