I have to use an image that is stored in the directory uploaded/images in Html/javascript file using Flask.
<img id="img" src= "">
<h1 id="file_path" style="visibility:hidden">{{ file_path }}</h1>
and js
var file_path = "../uploaded/images/" + document.getElementById("file_path").innerHTML;
document.getElementById("img").setAttribute("src",file_path)
And the directory structure looks like this:
predict.html contains those codes (above).
The image to be shown is inside uploaded/images.
home.py is the flask app.