Spaces:
Paused
Paused
File size: 893 Bytes
8320099 d4eb1f6 8320099 d4eb1f6 534b3be d4eb1f6 5909d53 d4eb1f6 8320099 |
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 |
<!DOCTYPE html>
<html>
<head>
<title>Webcam Image Capture</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<h1>Webcam Image Capture</h1>
<p>Capture a webcam frame or upload an image.</p>
{% if error %}
<p style="color: red;">{{ error }}</p>
{% endif %}
<div>
<video id="webcam" autoplay playsinline width="640" height="480"></video>
<canvas id="canvas" style="display: none;"></canvas>
<br>
<button onclick="capture()">Capture Webcam Frame</button>
</div>
<form id="upload-form" method="POST" enctype="multipart/form-data" action="/upload">
<input type="file" name="file" accept="image/*" id="file-input">
<input type="submit" value="Upload Image">
</form>
<script src="{{ url_for('static', filename='script.js') }}"></script>
</body>
</html> |