Spaces:
Sleeping
Sleeping
Create templates/index.html
Browse files- templates/index.html +27 -0
templates/index.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Surf Pop-Up Analyzer</title>
|
| 5 |
+
</head>
|
| 6 |
+
<body>
|
| 7 |
+
<h1>Upload Your Surf Video</h1>
|
| 8 |
+
|
| 9 |
+
<form method="POST" action="/upload" enctype="multipart/form-data">
|
| 10 |
+
<input type="file" name="video" accept="video/*" required>
|
| 11 |
+
<button type="submit">Analyze</button>
|
| 12 |
+
</form>
|
| 13 |
+
|
| 14 |
+
{% if video_filename %}
|
| 15 |
+
<h2 style="color:green;">Upload successful!</h2>
|
| 16 |
+
<video width="480" controls>
|
| 17 |
+
<source src="{{ url_for('static', filename='../uploads/' + video_filename) }}" type="video/mp4">
|
| 18 |
+
Your browser does not support the video tag.
|
| 19 |
+
</video>
|
| 20 |
+
{% endif %}
|
| 21 |
+
|
| 22 |
+
{% if result_image %}
|
| 23 |
+
<h2>Analysis Result:</h2>
|
| 24 |
+
<img src="{{ url_for('static', filename='results/' + result_image) }}" width="480">
|
| 25 |
+
{% endif %}
|
| 26 |
+
</body>
|
| 27 |
+
</html>
|