bertviz icon indicating copy to clipboard operation
bertviz copied to clipboard

How do I export vector graphics?

Open vanewu opened this issue 5 years ago • 7 comments

After using bertviz to visualize attention in a notebook, how to export vector pictures that meet the requirements of the paper?

vanewu avatar Jan 16 '20 07:01 vanewu

This feature isn't yet available unfortunately, but I hope to add it at some point. Are you using the attention-head view?

jessevig avatar Jan 16 '20 14:01 jessevig

Your work is excellent and I would like to thank you for it. Can I save the image I drew with head_view?

tom68-ll avatar Jun 03 '21 03:06 tom68-ll

Hi @tom68-ll thanks for your kind words, and for the question. Unfortunately we don't support this feature yet. So I believe the best you can do currently is a screen print unfortunately.

jessevig avatar Jun 03 '21 04:06 jessevig

I just capture(or print screen) the image and save it

Lyshc-cgc avatar Aug 19 '21 08:08 Lyshc-cgc

For the head_view we can extract the attention values and draw a own graphic with plt for example and save it as svg.

LukasKriesch avatar Oct 07 '22 08:10 LukasKriesch

There is now a branch that adds this feature but the functionality is somewhat limited (e.g. cannot select token prior to downloading image).

jessevig avatar Oct 07 '22 13:10 jessevig

+1, needed for writing research papers

tnlin avatar Jan 20 '23 03:01 tnlin