I am trying to build a small application (using streamlit) to visualise entity relations detected from my DNN model given a text input (a sentence). I wonder if I can, in some way, use prodigy's entity relation visualiser in such an app? Thank you.
Hi! We don't currently have an option to use the Prodigy components independently, e.g. in a Streamlit app, but it's something that I have on my list of future enhancements
In the meantime, you could probably achieve something similar by calling into spaCy's
displacy visualizer and manually rendering the words and arcs: https://spacy.io/usage/visualizers#manual-usage Under the hood, the visualizer doesn't really care what you're rendering, so it'd just come down to creating a list of words (with your entities merged into single words) and converting the relations to a list of arcs referencing the entities. You could also use the tags displayed with the words to show the entity labels.