-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
82 lines (78 loc) · 2.51 KB
/
index.html
File metadata and controls
82 lines (78 loc) · 2.51 KB
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
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>DermaScan</title>
<link rel="stylesheet" href="style.css" />
<style>
h1 {
font-family: "monospace";
}
</style>
</head>
<body>
<div class="banner">
<div class="navbar">
<img src="http://imageshack.com/i/po11ErGdp" alt="Logo" class="logo" />
<ul>
<li><a href="http://127.0.0.1:5500/index.html">Home</a></li>
<li>
<a href="http://127.0.0.1:5500/.vscode/aboutIndex.html">About</a>
</li>
</ul>
</div>
<div class="content">
<h1>Skintelligence</h1>
<p>
Skintelligence is an AI tool that diagnoses skin conditions by
analyzing<br />
user-submitted photos or links, matching them to a comprehensive
database,<br />
and offering treatment options and skincare information for better
skin health.
</p>
<button type="button" id="uploadButton">Upload your Image</button>
<button type="button" id="submitButton">Submit</button>
<input type="file" id="fileInput" style="display: none" />
<div id="previewContainer">
<img id="previewImage" style="display: none" />
</div>
</div>
</div>
<script>
let imageData = null;
document
.getElementById("uploadButton")
.addEventListener("click", function () {
document.getElementById("fileInput").click();
});
document
.getElementById("fileInput")
.addEventListener("change", function () {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function (e) {
const image = document.getElementById("previewImage");
image.src = e.target.result;
image.style.display = "block";
imageData = e.target.result;
};
reader.readAsDataURL(file);
}
});
document
.getElementById("submitButton")
.addEventListener("click", function () {
if (imageData) {
const hasSkinDisease = true; // Replace with your AI logic
window.location.href =
"http://127.0.0.1:5500/.vscode/submitIndex2.html";
} else {
alert("Please upload an image first.");
}
});
</script>
</body>
</html>