wangrong
2025-01-23 02819b5c047bb354b0ef2374e7c6a6ac4bbd5bba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f5f5f5;
            font-family: Arial, sans-serif;
        }
 
        .container {
            position:absolute;
            top: 0;
            text-align: left;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
            padding: 20px;
            max-width: 800px;
            width: 100%;
        }
 
        .title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 10px;
            text-align: left;
            display: block;
        }
 
        img {
            width: 80px;
            height: 80px;
            margin: 8px;
        }
 
        .image-row {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
        }
 
        .return-link {
            top: 10px;
            right: 10px;
            text-decoration: none;
            color: #4caf50;
            font-weight: bold;
            text-align: right;
        }
    </style>
    <title>Image Search Results</title>
</head>
<body>
    <div class="container">
        <div class="return-link"><a href="/" class="return-link">back to home</a></div>
        <div class="title">Query Image</div>
        <img src="{{query_image_url}}" alt="Input Image">
 
        <div class="title">Search Results of top{{topK}}</div>
        <div class="image-row">
            {% for result in search_results: %}
                <img src="{{result['image_url']}}" alt="{{result['distance']}}" title="{{result['distance']}}">
            {% endfor %}
        </div>
    </div>
</body>
</html>