nateraw / modelcards

📝 Utility to create, edit, and publish model cards on the Hugging Face Hub. [**Now lives in huggingface_hub**]
MIT License
15 stars 4 forks source link

Should we use card data object directly in ModelCard.from_template? #19

Closed nateraw closed 2 years ago

nateraw commented 2 years ago

Right now, the ModelCard.from_template function takes in the same args as CardData, and then just initializes it. Does it make more sense to initialize CardData separately and pass that to ModelCard.from_template? That way the documentation around card data is all in one place.

So instead of

card = ModelCard.from_template(language='en', ...)

you would do

card_data = CardData(language='en', ...)
card = ModelCard.from_template(card_data, **template_kwargs)

CC @adrinjalali

nateraw commented 2 years ago

Also CC @mgerchick if you have any thoughts here

adrinjalali commented 2 years ago

Yeah that looks reasonable to me.