Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +22 -64
templates/index.html
CHANGED
@@ -1,92 +1,50 @@
|
|
1 |
-
|
2 |
-
{#L1 labels/object#}
|
3 |
-
{#L2 Logo Detection#}
|
4 |
-
{#L3 Text/OCR#}
|
5 |
-
|
6 |
-
|
7 |
-
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"/>
|
8 |
<html lang="en">
|
9 |
<head>
|
10 |
-
|
11 |
-
<title>Mohamed sign</title>
|
12 |
-
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
13 |
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
14 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.1/socket.io.js"></script>
|
15 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
|
16 |
-
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
|
17 |
-
crossorigin="anonymous"></script>
|
18 |
-
<script type="text/javascript" src="{{ url_for('static', filename='script.js') }}"></script>
|
19 |
-
<!-- Add this to the <head> section of your HTML file -->
|
20 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
|
21 |
-
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
|
22 |
-
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
23 |
-
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"/>
|
24 |
-
|
25 |
-
|
26 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/fontawesome.min.css"
|
27 |
-
integrity="sha512-xX2rYBFJSj86W54Fyv1de80DWBq7zYLn2z0I9bIhQG+rxIF6XVJUpdGnsNHWRa6AvP89vtFupEPDP8eZAtu9qA=="
|
28 |
-
crossorigin="anonymous" referrerpolicy="no-referrer"/>
|
29 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/brands.min.css"
|
30 |
-
integrity="sha512-OivR4OdSsE1onDm/i3J3Hpsm5GmOVvr9r49K3jJ0dnsxVzZgaOJ5MfxEAxCyGrzWozL9uJGKz6un3A7L+redIQ=="
|
31 |
-
crossorigin="anonymous" referrerpolicy="no-referrer"/>
|
32 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
|
33 |
-
integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g=="
|
34 |
-
crossorigin="anonymous" referrerpolicy="no-referrer"/>
|
35 |
-
|
36 |
-
<link rel="stylesheet" type="text/css"
|
37 |
-
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css">
|
38 |
-
|
39 |
-
|
40 |
-
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.0/css/dataTables.bootstrap5.min.css">
|
41 |
-
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
42 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
43 |
-
|
44 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
45 |
-
<link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.0/flowbite.min.css" rel="stylesheet" />
|
46 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.0/flowbite.min.js"></script>
|
47 |
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap">
|
48 |
-
|
49 |
</head>
|
50 |
<body class="bg-gray-900">
|
51 |
<div class="grid grid-cols-12 gap-4 mx-8 mt-8" style="color: gray; border-radius: 10px;">
|
52 |
-
|
53 |
-
<!-- Controls -->
|
54 |
<div class="col-span-2 ml-4" style="background-color: lightgrey; border-radius: 10px;">
|
55 |
<h2 class="border-b border-gray-800 py-4 mb-4 text-3xl font-bold leading-none tracking-tight md:text-4xl lg:text-4xl text-gray-500">التحكم</h2>
|
56 |
<div class="border-b border-gray-800" style="padding: 10px;">
|
57 |
-
<!-- Start Camera Button -->
|
58 |
<button class="text-white focus:ring-4 focus:outline-none mt-1.5 font-medium rounded-lg text-sm w-full py-2.5 text-center bg-gray-700 hover:bg-gray-800 focus:ring-gray-900" id="start-camera" type="button" onclick="startCamera()">بدء الكاميرا</button>
|
59 |
-
<br>
|
60 |
-
<!-- Stop Camera Button -->
|
61 |
<button class="text-white focus:ring-4 focus:outline-none mt-1.5 font-medium rounded-lg text-sm w-full py-2.5 text-center bg-gray-700 hover:bg-gray-800 focus:ring-gray-900" id="stop-camera" type="button" onclick="stopCamera()">إيقاف الكاميرا</button>
|
62 |
</div>
|
63 |
-
<!-- Additional Controls here -->
|
64 |
</div>
|
65 |
|
66 |
-
<!-- Video -->
|
67 |
<div class="col-span-8 mx-4 mt-3" style="background-color: lightgrey; border-radius: 10px;">
|
68 |
<div id="container">
|
69 |
-
<!--
|
70 |
-
<img class="center" src="/video_feed" id="video_feed">
|
71 |
</div>
|
72 |
</div>
|
73 |
|
74 |
-
<!-- Terminal -->
|
75 |
<div class="col-span-2 mr-4" style="background-color: lightgrey; border-radius: 10px;">
|
76 |
<h2 class="border-b border-gray-800 py-4 mb-4 text-3xl flex justify-end font-bold leading-none tracking-tight md:text-4xl lg:text-4xl text-gray-500">الناتج</h2>
|
77 |
-
<div id="terminal" class="w-full"></div>
|
78 |
</div>
|
79 |
</div>
|
80 |
|
81 |
<div>
|
82 |
-
<p id="finalSentencePara" class="text-gray-500 mt-4 text-center">
|
83 |
-
</p>
|
84 |
</div>
|
85 |
|
86 |
-
<!--
|
87 |
-
<script
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
</body>
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
+
<!-- Include necessary libraries and stylesheets -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
</head>
|
6 |
<body class="bg-gray-900">
|
7 |
<div class="grid grid-cols-12 gap-4 mx-8 mt-8" style="color: gray; border-radius: 10px;">
|
8 |
+
<!-- Controls section -->
|
|
|
9 |
<div class="col-span-2 ml-4" style="background-color: lightgrey; border-radius: 10px;">
|
10 |
<h2 class="border-b border-gray-800 py-4 mb-4 text-3xl font-bold leading-none tracking-tight md:text-4xl lg:text-4xl text-gray-500">التحكم</h2>
|
11 |
<div class="border-b border-gray-800" style="padding: 10px;">
|
|
|
12 |
<button class="text-white focus:ring-4 focus:outline-none mt-1.5 font-medium rounded-lg text-sm w-full py-2.5 text-center bg-gray-700 hover:bg-gray-800 focus:ring-gray-900" id="start-camera" type="button" onclick="startCamera()">بدء الكاميرا</button>
|
|
|
|
|
13 |
<button class="text-white focus:ring-4 focus:outline-none mt-1.5 font-medium rounded-lg text-sm w-full py-2.5 text-center bg-gray-700 hover:bg-gray-800 focus:ring-gray-900" id="stop-camera" type="button" onclick="stopCamera()">إيقاف الكاميرا</button>
|
14 |
</div>
|
|
|
15 |
</div>
|
16 |
|
17 |
+
<!-- Video section -->
|
18 |
<div class="col-span-8 mx-4 mt-3" style="background-color: lightgrey; border-radius: 10px;">
|
19 |
<div id="container">
|
20 |
+
<img class="center" src="" id="video_feed"> <!-- Updated to have an empty source -->
|
|
|
21 |
</div>
|
22 |
</div>
|
23 |
|
24 |
+
<!-- Terminal section -->
|
25 |
<div class="col-span-2 mr-4" style="background-color: lightgrey; border-radius: 10px;">
|
26 |
<h2 class="border-b border-gray-800 py-4 mb-4 text-3xl flex justify-end font-bold leading-none tracking-tight md:text-4xl lg:text-4xl text-gray-500">الناتج</h2>
|
27 |
+
<div id="terminal" class="w-full"></div>
|
28 |
</div>
|
29 |
</div>
|
30 |
|
31 |
<div>
|
32 |
+
<p id="finalSentencePara" class="text-gray-500 mt-4 text-center"></p>
|
|
|
33 |
</div>
|
34 |
|
35 |
+
<!-- Inline JavaScript -->
|
36 |
+
<script>
|
37 |
+
function startCamera() {
|
38 |
+
fetch('/capture_frame') // Send a request to the Flask app route
|
39 |
+
.then(response => response.text())
|
40 |
+
.then(data => {
|
41 |
+
document.getElementById("video_feed").src = 'data:image/jpeg;base64,' + data; // Display the processed frame
|
42 |
+
});
|
43 |
+
}
|
44 |
+
|
45 |
+
function stopCamera() {
|
46 |
+
// Add logic to stop the camera feed
|
47 |
+
}
|
48 |
+
</script>
|
49 |
</body>
|
|
|
|
|
|
|
50 |
</html>
|