Correct table column widths
Closed this issue · 0 comments
ivyleavedtoadflax commented
Column widths are calculated dynamically by https://github.com/MantisAI/hfie/blob/4cd9c4ea45188cae5169e358a69b81c89599c99f/hfie/utils.py#L4. It works by finding the longest entry for that column, and setting a column width based on that. This does not take into account the column header, meaning that we can end up with the column being less wide than the title, e.g.: (check the Revision
column)
Name State Model Revision Url
----------- ------- -------- ---- ------------------------------------------------------------------
development running t5-small main https://xxxxxxxxxxxxxxxx.us-east-1.aws.endpoints.huggingface.cloud
It would be nice to amend add some functionality to https://github.com/MantisAI/hfie/blob/4cd9c4ea45188cae5169e358a69b81c89599c99f/hfie/utils.py#L14 to combine the header with the table data and calculate the width based on whatever is larger - the data or the header.