Annotation tool embed into Streamlit - Cannot export

Dear experts,

I wanna embed annotation tool, VGG Image Annotator (VIA), into streamlit.

The tool was downloaded from official website that it was a html file. All things were written in one document.

When I opened this html individually to test, everything worked well. However, after I embedded into streamlit, the export function was being invalid.

I wonder that is there any function or reason from streamlit to restrict this function (download files)?

Here is my simple code.

import streamlit.components.v1 as components
HtmlFile = open("via_face_demo.html", 'r', encoding='utf-8')
source_code = HtmlFile.read() 
components.html(source_code,  height = 1300, width= 1300)

(As streamlit discussion forum cannot allow me to upload html file, so the via_face_demo.html can download from here.)

Thank you so much.

BR,
Chieh

Hi @Chieh -

I suspect that you either have an issue where one of the JavaScript libraries that the HTML file relies on isn’t present, or you’re running into an issue with iframes being ‘sandboxed’. For the first one, you can check via the developer tools in your browser, to see if there are any errors being reported. If the issue is one where the iframe isn’t allowed to access the local computing environment, I think that’s a general web development security feature, not one disabled by Streamlit.

Best,
Randy

hi @randyzwitch

Thanks for your reply and hint!!
I am sorry that actually I have no enough ability to track that so I will leave that issue and idea.
Thank you again!

Best regards,
Chieh