Skip to content

Fix displacy.render usage for Jupyter Notebooks #13851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

AkashHiremath856
Copy link

Summary

This PR fixes incorrect usage of displacy.render with IPython.display.HTML, which caused rendering issues in Jupyter Notebooks.

Fix

Replaces:

display(HTML(displacy.render(doc, style="ent")))

@notlosca
Copy link

Had the same issue and solved by slightly modifying the init.py (like you). The problem is related to the IPython version. Since IPython 7.14 they moved IPython display to another package (ref: jessevig/bertviz#140)

@AkashHiremath856
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants