File size: 1,374 Bytes
b29dd97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Object Detection</title>
    <style>

        body {

            font-family: Arial, sans-serif;

            background: #f5f5f5;

            padding: 30px;

            text-align: center;

        }

        .container {

            background: white;

            padding: 20px;

            border-radius: 8px;

            box-shadow: 0 2px 8px rgba(0,0,0,0.1);

            display: inline-block;

        }

        input[type="file"], input[type="submit"] {

            margin: 10px;

            padding: 8px 12px;

            border-radius: 4px;

        }

        video {

            max-width: 100%;

            margin-top: 20px;

        }

    </style>
</head>
<body>
    <div class="container">
        <h1>Object Detection (Video)</h1>
        <form method="POST" enctype="multipart/form-data">
            <input type="file" name="video" accept="video/*" required>
            <br>
            <input type="submit" value="Upload & Detect">
        </form>
        {% if video_result %}
            <h2>Result Video</h2>
            <video controls>
                <source src="{{ video_result }}" type="video/mp4">
                Your browser does not support the video tag.
            </video>
        {% endif %}
    </div>
</body>
</html>