Cannot Fetch Model Status From HuggingFace

Hello,

I am working on the 2nd challenge of the lesson “The Ai Engineer Path / Open-Source Models / Finding Free Models With The HuggingFace Hub”.

In that lesson we have the function “isModelInferenceEnabled”. This function does not execute successfully for me. The fetch call produces an error response.

Here is a link to my solution scrim which demonstrates the error:
Finding Free Models With The HuggingFace.js Hub 🤗

Loading the following url with a browser results in the screen shot below:
https://api-inference.huggingface.co/status/prompthero/openjourney

Hey @verticon, I wonder if there has been an update on HF which broke this. Tagging one of our teachers here for more insight @Tom_Chant

Hi Tom,

So good to hear from you on this.

I have been banging away on this. I believe that you are correct about something having changed on HuggingFace. The curl commands mentioned here do not work; a get_model_status api function is discussed but I cannot figure it out.

The teacher of that lesson is Arsala Khan. Apparently he is no longer with Scrimba as I cannot tag him. Per Borgen is one of the teachers in the Open Source Models section.

@perborgen

Hi @verticon

Yes, something is broken there. I had some trouble figuring out how to find free models but I think, after a chat with Claude, that the code in this scrip will work… at least it lists the HF inference models. Is that what was wanted?

Hi Tom,

The original functionality was to find all models that perform a specified task and that have likes in excess of a specified threshold.

How did you find out about the query string to the https://huggingface.co/api/models endpoint? I’ll go have a look to see if other parameters are supported.