Embed a Dynamic Live Widget in Model's Card

Hi everyone!

I’m working on a new evaluation as part of my research that I’d like to share with the community. Ideally, I’d like to embed a live, interactive widget directly in a model card that dynamically displays the evaluation results. My idea is to create a widget that connects to my Hugging Face Space—where the evaluation is hosted—and automatically updates the model card when a model is evaluated.

Is there any way to embed dynamic code or widgets directly in a model card on the Hugging Face Hub? If not, what would be the recommended workaround?

Thanks in advance for any guidance!

1 Like

The model card (README.md) is a combination of YAML and Markdown, so I think it should be possible to achieve some functionality by writing HTML in the Markdown section, but I don’t think the iframe used for embedding Spaces will work… (or maybe it will?)

So, it may be necessary to take measures to dynamically rewrite the model card from the Spaces side…

Current Widgets