<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>通用OCR结果展示</title>
    <style>
        html, body {
            width: 100%;
            padding: 0;
            margin: 0;
        }

        .img-line {
            width: 100%;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
            margin-top: 50px;
        }

        img {
            width: 600px;
            height: auto;
            box-sizing: border-box;
            padding: 5px;
            border: 1px solid #000;
        }

        .data-table {
            width: 100%;
            justify-content: center;
            box-sizing: border-box;
            margin: 50px 0;
            padding: 0 20px;
        }

        table {
            width: 100%;
            border: none;
            background-color: aqua;
        }

        .col1 {
            text-align: center;
            width: 5%;
        }

        .col2 {
            width: 80%;
        }

        .col3 {
            width: 15%;
        }

        td, th {
            background-color: white;
        }
    </style>
</head>
<body>
<div class="img-line">
    <a target="_blank" href="/{{ raw }}">
        <img src="/{{ raw }}" alt="raw">
    </a>
</div>
<div class="data-table">
    <table>
        <thead>
        <tr>
            <th class="col1">序号</th>
            <th class="col2">内容</th>
            <th class="col3">概率</th>
        </tr>
        </thead>
        <tbody>
        {% for item in data %}
            <tr>
                <td class="col1">{{ item.index }}</td>
                <td class="col2">{{ item.word }}</td>
                <td class="col3">{{ item.rate }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
</body>
</html>