Spaces:
Paused
Paused
Create templates/index.html
Browse files- templates/index.html +25 -0
templates/index.html
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Webcam Image Capture</title>
|
5 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
<h1>Webcam Image Capture</h1>
|
9 |
+
<p>Capture a webcam frame or upload an image.</p>
|
10 |
+
{% if error %}
|
11 |
+
<p style="color: red;">{{ error }}</p>
|
12 |
+
{% endif %}
|
13 |
+
<div>
|
14 |
+
<video id="webcam" autoplay playsinline width="640" height="480"></video>
|
15 |
+
<canvas id="canvas" style="display: none;"></canvas>
|
16 |
+
<br>
|
17 |
+
<button onclick="capture()">Capture Webcam Frame</button>
|
18 |
+
</div>
|
19 |
+
<form id="upload-form" method="POST" enctype="multipart/form-data" action="/upload">
|
20 |
+
<input type="file" name="file" accept="image/*" id="file-input">
|
21 |
+
<input type="submit" value="Upload Image">
|
22 |
+
</form>
|
23 |
+
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
24 |
+
</body>
|
25 |
+
</html>
|