How to clear output of Div when user upload file?

Hi All,

I tried this beautiful library and created an application where I ask file(Image) from the user and then through my object detection model, I cropped and showed different things based on user options. Everything is working fine.

The problem that I am facing is for the first time the Div for Image output is empty and when someone uploads an Image it shows the desired result. But when I try to upload the second time the previous output is still on the screen.
How can I remove/clear the Div so that it is fresh as the first time?