-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
202 lines (197 loc) · 7.18 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Garbage Data Filter</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- New Google Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sofia+Sans+Semi+Condensed:ital,wght@0,1..1000;1,1..1000&display=swap" rel="stylesheet">
<style>
body {
background-color: #FFE9D0;
font-family: 'Sofia Sans Semi Condensed', sans-serif;
}
.top-bar {
background-color: #FF6B6B;
color: white;
padding: 15px 0;
margin-bottom: 30px;
}
.top-bar h2 {
margin: 0;
font-size: 1.2rem;
line-height: 1.4;
}
.center-content {
display: flex;
align-items: center;
justify-content: center;
margin-top: 50px;
overflow: hidden;
}
.center-content img {
max-width: 30%;
height: auto;
margin-right: 20px;
opacity: 0;
animation: slideFromLeft 1s ease-out forwards;
}
.center-content .text-content {
max-width: 50%;
}
.center-content h1 {
color: black;
text-align: left;
margin-bottom: 20px;
font-size: 2rem;
opacity: 0;
transform: translateX(100%);
animation: slideInFromRight 1s ease-out forwards;
}
.center-content img { animation-delay: 0.2s; }
.center-content h1:nth-child(1) { animation-delay: 0.4s; }
.center-content h1:nth-child(2) { animation-delay: 0.6s; }
.center-content h1:nth-child(3) { animation-delay: 0.8s; }
.btn-proceed, .btn-submit {
background-color: #4ECDC4;
border: none;
color: white;
font-weight: bold;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto;
padding: 10px 20px;
}
.btn-proceed:hover, .btn-submit:hover {
background-color: #45B7AA;
transform: translateY(-2px);
}
.btn-proceed {
animation: jump 0.5s ease infinite;
}
.btn-submit img {
margin-right: 8px;
width: 30px;
height: 30px;
}
.form-container {
background-color: white;
border-radius: 15px;
padding: 30px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
display: none;
}
textarea.form-control {
border: 2px solid #FF6B6B;
border-radius: 10px;
}
#result-container {
background-color: white;
border-radius: 15px;
padding: 30px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
margin-top: 20px;
border: 2px solid #FF6B6B;
}
.result-heading {
font-size: 1.5em;
font-weight: bold;
text-align: center;
margin-bottom: 10px;
margin-top: 20px;
}
@keyframes slideFromLeft {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInFromRight {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes jump {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
</style>
</head>
<body>
<div class="top-bar text-center">
<h1>Effective Garbage Data Filtering Algorithm for SNS Big Data Processing using Machine Learning</h1>
</div>
<div class="container">
<div class="center-content">
<img src="{{ url_for('static', filename='folder.png') }}" alt="Folder Image">
<div class="text-content">
<h1>Tired of Messy Data?</h1>
<h1>Press the button to start filtering your SNS data</h1>
</div>
</div>
<div class="text-center">
<button class="btn btn-proceed btn-lg" onclick="showForm()">Proceed Further</button>
</div>
<div class="row justify-content-center">
<div class="col-md-8">
<div></div>
<div class="form-container" id="form-container">
<h2 class="text-center mb-4">Raw Data</h2>
<form id="dataForm">
<div class="mb-3">
<textarea class="form-control" name="raw_data" rows="10" placeholder="Enter raw data here..."></textarea>
</div>
<div class="text-center">
<button type="submit" class="btn btn-submit btn-lg">
<img src="{{ url_for('static', filename='delete.png') }}" alt="Delete Icon">
Junk-Free Data
</button>
</div>
</form>
<h2 class="result-heading">Filtered Data:</h2>
<div id="result-container">
<div id="result"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS and Popper.js -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<!-- JavaScript to handle animations and form display -->
<script>
function showForm() {
document.querySelector('.center-content').style.display = 'none';
document.querySelector('.btn-proceed').style.display = 'none';
document.getElementById('form-container').style.display = 'block';
}
document.querySelector('#dataForm').onsubmit = async (e) => {
e.preventDefault();
const formData = new FormData(e.target);
const response = await fetch('/predict', {
method: 'POST',
body: formData
});
const result = await response.json();
const filteredSentences = result.filtered_sentences;
document.getElementById('result').innerHTML = filteredSentences.join('<br>');
};
</script>
</body>
</html>