Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I am trying to read a static png file from local file system, however unable to see it on the webapp.
Please help.
..
..
plt.savefig('my_image.png',bbox_inches='tight') ## Works and my_image.png is created and saved locally on my server.
# I am able to save the png file on the following location #/home/dataiku/dss/tmp/ProjectName/web_apps/xwPBgPO/
div_image = Div(text="""<img src="/home/dataiku/dss/tmp/KNRB_DS/web_apps/xwPBgPO/my_image.png" alt="div_image">""", width=450, height=450)
curdoc().add_root(div_image)
The above works if the path is an https/http however not from a local file.
Thanks
Sabs
Hi,
you need to save the image into `/home/dataiku/dss/local/static` and access it with an absolute path, like here with a a.png inside local/static
div_image = Div(text="""<img src="/local/static/a.png" alt="div_image">""", width=450, height=450)
curdoc().add_root(div_image)
Regards,
Frederic
Hi,
you need to save the image into `/home/dataiku/dss/local/static` and access it with an absolute path, like here with a a.png inside local/static
div_image = Div(text="""<img src="/local/static/a.png" alt="div_image">""", width=450, height=450)
curdoc().add_root(div_image)
Regards,
Frederic