Feature request: add copy-to-clipboard button to model / dataset names

Hi :hugs: team!

As a user of the Hub, I would like to be able to quickly copy the name of a model / dataset so that I can paste the contents into load_dataset or from_pretrained. This would be especially useful for long model names like distilbert-base-uncased-finetuned-sst-2-english

One possible solution would be to add a “Copy to clipboard” button next to the model / dataset name, similar to what already exists for the “Use in transformers” button. See below for a screenshot of what I mean:

PS. apologies if something like this already exists and I’ve missed it!


Hm, I’m generally a fan of more usability features, but doesn’t this bloat the interface just too much? There’s already so much on the screen and copying a name is as easy as selecting and ctrl+c’ing.

Good point, and it’s probably a form of premature optimization to save those clicks :slight_smile: .

I am mostly spoiled by the FastAPI docs, where every code snippet can be copied, even if it’s a single line:

For code snippets I agree. This is often part of a tutorial so you would need to copy-paste quite frequently so a dedicated button in those snippets is useful. For heading and “normal” parts of texts, I would personally not add it. Too many buttons clutter the interface and will confuse or turn off new users - even if it’s just visual. Chaotic web pages are extremely annoying so I am a fan of keeping everything as simple as possible.

Yeah I’m all for minimalist web design as well! I only made this suggestion because the search + copy workflow is a common pattern for me. In any case, I can certainly live with the few extra clicks :slight_smile: