{% for sim in ssims %}
{% for file, encode_file in paths.items() %} <div class="col-lg-3 col-md-4 col-xs-6 thumb">
<img class="img-responsive" src='{{ encode_file }}' height=100% width=100% onclick="clicked_img(this)">
<div class="desc">{{ file }}</div>
<div class="card-body">
<p class="card-text"><p>SSIM ={{ sim }}</p>
</div>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% extends 'menu.html' %}
{% block body %}
{% endblock %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/style.css">
<script type="text/javascript" src="static/script.js"></script>
<title>
{% block title %}
{% endblock %}
</title>
</head>
<body>
<div class="overlay"><img src="blah" id="top" hidden=True>
<span id="close" hidden=True onclick=do_close()><b><u>CLOSE(X)</u></b></span>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Images monitor</h1>
</div>
<hr>
{% for file, encode_file in paths.items() %}
<div class="col-lg-3 col-md-4 col-xs-6 thumb">
<img class="img-responsive" src='{{ encode_file }}' height=100% width=100% onclick="clicked_img(this)" >
<div class="desc">{{ file }}</div>
<div class="card-body">
<p class="card-text">Metric1 =
Metric2 =
Metric3 = </p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" onclick="window.open('https://google.com')" class="btn btn-sm btn-outline-secondary">LINK</button>
<button type="button" onclick="location.href='https://google.com';" class="btn btn-sm btn-outline-secondary">LINK</button>
<button type="button" onclick="location.href='https://google.com';" class="btn btn-sm btn-outline-secondary">LINK</button>
<hr>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% block body %}
{% endblock %}
</body>
</html><!DOCTYPE html>
from flask import Flask, render_template
import os
app = Flask(__name__)
picFolder = os.path.join('static', 'pics')
app.config['UPLOAD_FOLDER'] = picFolder
@app.route("/")
def index():
imageList = os.listdir('static/pics')
imagelist = ['pics/' + image for image in imageList]
return render_template("index.html", imagelist=imagelist)
app.run()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello Worl!</title>
</head>
<body>
<h1>Hello World!</h1>
{% for imagelist in imagelist %}
<img src = "{{ url_for('static', filename=imagelist)}}">
{% endfor %}
</body>
</html>