pyvis icon indicating copy to clipboard operation
pyvis copied to clipboard

Using pyvis HTML output in Gradio's Output

Open zhaoqf123 opened this issue 2 years ago • 3 comments

When using the output html of pyvis package on graph data, gradio cannot display the results. The resulting html itself can be opened by the browser.

For details, check the same issue in gradio issue.

It has been solved by @duerrsimon, and the solution can be found in the above issue.

In case that people encounter the same issue and come here, I open this issue and re-direct to the solution.

zhaoqf123 avatar Jun 21 '23 06:06 zhaoqf123

@zhaoqf123 the link in the solution is not working anymore

can kindly you share a working code snipped ?

vkuehn avatar Nov 27 '23 20:11 vkuehn

Just rebooted the space and it is working.

You can check the code here: https://huggingface.co/spaces/simonduerr/pyvisdemo/blob/main/app.py

Otherwise you guys should probably create a Pyvis custom component at some point :) https://www.gradio.app/guides/custom-components-in-five-minutes

duerrsimon avatar Nov 27 '23 21:11 duerrsimon

thanks this example works. unfortunately only on gradio. Would it could run locally

vkuehn avatar Nov 30 '23 19:11 vkuehn