huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
1.98k stars 514 forks source link

Modelcard pretty HTML #1365

Open quancore opened 1 year ago

quancore commented 1 year ago

HI, I am using model card function right now for our local model pipeline but it just outputs an md file and no options to output HTML. If I convert md file to HTML, it is a super dull HTML face. Would it be possible to export a visually pleasing, fully functional model card like Huggingface has on the website?

Wauplin commented 1 year ago

Hi @quancore :wave: What would be your use case to export a modelcard as HTML? The huggingface_hub main purpose is to interact with the Huggingface Hub. Its modelcard module allows you to create, edit and upload model cards and dataset cards. Those cards are README files stored in the repos, hence the markdown style. I'm not sure a markdown renderer directly in huggingface_hub really makes much sense as some packages already exist for that (not only in Python). What would be the goal of having HF-rendering style but not storing the cards on the Hub?

quancore commented 1 year ago

So for our use-case, we are using huggingface models but we are creating our on model cards rather than pushing and storing them on the hub. It would be a nice feature if the library directly export HTML rather than depending on the hub.

Wauplin commented 1 year ago

I'm not sure that's something we want to support, or at least not right now. I'll still ping @julien-c @Pierrci for visibility

julien-c commented 1 year ago

do you have an example of CSS you would like applied, @quancore ?

quancore commented 1 year ago

@julien-c hey, thank you for the answer. I implemented a very basic HTML conversation using python markdown and its extension with bootstrap CSS and I think it seems okay. I used bootstrap.

julien-c commented 1 year ago

cool! feel free to share a screenshot here if you'd like:)

quancore commented 1 year ago

Here is an example ss from html output: image