<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>上传照片</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
    <div class="container">
        <h1>上传照片并进行分类</h1>

        <!-- 上传照片表单 -->
        <form action="{{ url_for('upload') }}" method="POST" enctype="multipart/form-data">
            <div class="form-group">
                <label for="photos">选择照片：</label>
                <input type="file" id="photos" name="photos" multiple accept="image/*" required>
            </div>
            <button type="submit" class="btn">上传照片</button>
        </form>

        {% if photos %}
            <h2>上传照片的分类结果：</h2>
            <div class="photo-gallery">
                {% for photo in photos %}
                    <div class="photo-item">
                        <img src="{{ url_for('static', filename='uploads/temp/' + photo.filename) }}" alt="分类照片">
                    </div>
                {% endfor %}
            </div>
        {% endif %}
    </div>
</body>
</html>
