heboya8 commited on
Commit
d4eb1f6
·
verified ·
1 Parent(s): a56ec85

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +13 -6
templates/index.html CHANGED
@@ -1,18 +1,25 @@
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
- <title>Object Detection App</title>
5
  <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
6
  </head>
7
  <body>
8
- <h1>Object Detection with DETR</h1>
9
- <p>Upload an image to detect objects.</p>
10
  {% if error %}
11
  <p style="color: red;">{{ error }}</p>
12
  {% endif %}
13
- <form method="POST" enctype="multipart/form-data" action="/upload">
14
- <input type="file" name="file" accept="image/*">
15
- <input type="submit" value="Detect Objects">
 
 
 
 
 
 
16
  </form>
 
17
  </body>
18
  </html>
 
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>