forked from aforaditya/PlantDocWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (67 loc) · 3.74 KB
/
index.html
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="style.css">
<title>PlantDoc - Disease detection</title>
</head>
<body class="h-">
<div class="main flex justify-center md:p-5 flex-col md:flex-row">
<!-- Left part -->
<div class="h-full flex relative flex-col items-center justify-center gap-3 md:w-1/2 md:px-5 p-5">
<!-- Hackathon details -->
<div class="invisible md:visible md:absolute top-0 left-0 ">
<div class="flex w-24 gap-3">
<img src="images/cisco.png" alt="cisco_logo">
<img src="images/nasscom.png" alt="nasscom_logo">
</div>
<h2 class="text-white text-xl">Hackathon 2023</h2>
</div>
<h3 class="hero_text text-3xl text-white"><em>Early detection, early prevention</em><br>
Protect your plants with our disease detection website.</h3>
<!-- Google translate script -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div>
<!-- Right part -->
<div class="flex items-center">
<!-- Card -->
<div class="bg-white rounded-xl flex items-center flex-col p-8 gap-5 items-center justify-center pb-3">
<!-- Logo -->
<img src="images/logo.svg" alt="logo" class="h-14">
<!-- File Upload Box -->
<div id="upload_box" class="flex flex-col items-center bg-slate-100 hover:bg-slate-200 rounded-xl p-10 border-2 border-slate-500 border-dashed gap-7">
<img src="images/plant_icon.png" class="w-32">
<p>Please upload the image of the leaf</p>
<button onclick="handle_browse_click()" class="bg-[#91D74F] px-8 py-2 rounded-lg font-medium hover:ring-4 ring-[#b5f27c]">Browse files</button>
<form action="https://plant-doc2.onrender.com/submit" method="POST" enctype="multipart/form-data">
<input type="file" accept="image/*" name="image">
</form>
</div>
<!-- File Preview Box -->
<div id="preview_box">
<div class="flex flex-col max-w-md items-center bg-slate-100 hover:bg-slate-200 rounded-xl p-10 border-2 border-slate-500 gap-7">
<img class="max-h-60" id="preview_image" src="images/plant_icon.png" class="w-full">
</div>
<!-- Options Bar -->
<div class="p-5 space-x-3 flex justify-end">
<button onclick="toggle_view()">Reupload image</button>
<button id="upload_image_btn" onclick="uploadImage()" class="bg-[#91D74F] px-8 py-2 rounded-lg font-medium hover:ring-4 ring-[#b5f27c]">Scan Leaf</button>
</div>
</div>
<!-- Google translate button -->
<div id="google_translate_element"></div>
</div>
</div>
</div>
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase-storage.js"></script>
<script src="script.js"></script>
</body>
</html>