Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
240 lines (216 loc) · 13.7 KB
/
Copy pathindex.html
File metadata and controls
240 lines (216 loc) · 13.7 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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CleanseFlow - AI-Powered Data Cleaning</title>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#8a73c9">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="msapplication-TileColor" content="#b3a3e6">
<meta name="msapplication-config" content="/browserconfig.xml">
<meta name="theme-color" content="#b3a3e6">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #f0f2f5;
}
.header-gradient {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-primary {
background-color: #7c3aed;
color: white;
transition: background-color 0.3s, transform 0.2s;
}
.btn-primary:hover {
background-color: #6d28d9;
transform: translateY(-2px);
}
.btn-secondary {
background-color: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-secondary:hover {
background-color: rgba(255, 255, 255, 0.3);
}
.loader {
border: 4px solid #e5e7eb;
border-top: 4px solid #7c3aed;
border-radius: 50%;
width: 32px;
height: 32px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body class="text-slate-800">
<header class="header-gradient text-white sticky top-0 z-40">
<nav class="container mx-auto px-6 py-4 flex justify-between items-center">
<a href="#" class="text-2xl font-bold">🧹 CleanseFlow</a>
<div class="hidden md:flex items-center space-x-6">
<a href="#features" class="hover:text-purple-200 transition">Features</a>
<a href="#ai-demo" class="hover:text-purple-200 transition">AI Demo</a>
<a href="#process" class="hover:text-purple-200 transition">How It Works</a>
</div>
<a href="login.html" class="btn-secondary py-2 px-5 rounded-lg font-semibold">Sign In</a>
</nav>
</header>
<main>
<section class="header-gradient text-white">
<div class="container mx-auto px-6 pt-20 pb-24 text-center">
<h1 class="text-4xl md:text-6xl font-bold leading-tight">From Messy Data to<br>Meaningful Insights. Instantly.</h1>
<p class="mt-6 text-lg md:text-xl text-purple-200 max-w-3xl mx-auto">CleanseFlow is the vibrant, AI-powered platform that makes data cleaning intuitive, fast, and even a little bit fun. Stop wrestling with spreadsheets and start getting results.</p>
<div class="mt-10">
<a href="login.html" class="btn-primary py-4 px-10 text-lg rounded-lg shadow-xl font-bold">Get Started for Free</a>
</div>
</div>
</section>
<section id="features" class="py-20">
<div class="container mx-auto px-6">
<div class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold text-slate-900">A Powerful, Vibrant Toolkit</h2>
<p class="mt-4 text-lg text-slate-600 max-w-2xl mx-auto">Everything you need to transform your data, presented in a clear, user-friendly interface.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
<div class="bg-white p-6 rounded-xl shadow-md text-center hover:shadow-lg hover:-translate-y-1 transition-all">
<span class="text-4xl">🗑️</span>
<h3 class="font-bold text-xl mt-4 mb-2">Handle Duplicates</h3>
<p class="text-slate-600 text-sm">Find and eliminate duplicate rows with a single click to ensure data integrity.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md text-center hover:shadow-lg hover:-translate-y-1 transition-all">
<span class="text-4xl">📝</span>
<h3 class="font-bold text-xl mt-4 mb-2">Manage Missing Values</h3>
<p class="text-slate-600 text-sm">Intelligently fill or remove rows with missing information to complete your dataset.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md text-center hover:shadow-lg hover:-translate-y-1 transition-all">
<span class="text-4xl"> Aa </span>
<h3 class="font-bold text-xl mt-4 mb-2">Standardize Text</h3>
<p class="text-slate-600 text-sm">Effortlessly change text case and trim whitespace for consistent formatting.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md text-center hover:shadow-lg hover:-translate-y-1 transition-all">
<span class="text-4xl">✨</span>
<h3 class="font-bold text-xl mt-4 mb-2">AI-Powered Cleaning</h3>
<p class="text-slate-600 text-sm">Let AI suggest cleaning steps, detect anomalies, and fill data intelligently.</p>
</div>
</div>
</div>
</section>
<section id="ai-demo" class="py-20 bg-white">
<div class="container mx-auto px-6">
<div class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold text-slate-900">Experience AI Instantly</h2>
<p class="mt-4 text-lg text-slate-600 max-w-3xl mx-auto">Curious about your data's potential? Describe your data columns below and let our AI reveal the kind of insights you could unlock.</p>
</div>
<div class="max-w-2xl mx-auto bg-slate-50 p-8 rounded-xl border border-gray-200 shadow-sm">
<label for="data-description" class="block text-lg font-semibold text-slate-800 mb-2">Describe your data headers:</label>
<textarea id="data-description" class="w-full h-24 p-3 border border-gray-300 rounded-lg text-base" placeholder="e.g., customer names, purchase dates, product categories, and total price..."></textarea>
<button id="get-potential-btn" class="btn-primary w-full mt-4 py-3 px-5 rounded-lg font-semibold text-lg">✨ Reveal Potential Insights</button>
<div class="mt-6 p-4 bg-amber-50 border-l-4 border-amber-400 text-amber-800 rounded-r-lg text-sm">
<p><strong>Please Note:</strong> The AI assistant is not active on this page as an API key is required. To see it in action, please visit the <a href="https://github.com/Saikushal185" target="_blank" rel="noopener noreferrer" class="font-semibold underline hover:text-amber-900">GitHub repository</a>, download the project, and add your own API key to the script.</p>
</div>
<div id="potential-output" class="mt-6 text-base"></div>
</div>
</div>
</section>
<section id="process" class="py-20">
<div class="container mx-auto px-6">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold text-slate-900">A Simple Path to Clean Data</h2>
<p class="mt-4 text-lg text-slate-600 max-w-2xl mx-auto">Our intuitive step-by-step process makes data cleaning efficient and straightforward.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div class="text-center">
<div class="flex justify-center items-center h-24 w-24 mx-auto bg-purple-100 text-purple-600 rounded-full text-3xl font-bold">1</div>
<h3 class="font-bold text-xl my-4">Sign In</h3>
<p class="text-slate-600">Create an account or sign in to get started.</p>
</div>
<div class="text-center">
<div class="flex justify-center items-center h-24 w-24 mx-auto bg-indigo-100 text-indigo-600 rounded-full text-3xl font-bold">2</div>
<h3 class="font-bold text-xl my-4">Upload CSV</h3>
<p class="text-slate-600">Securely upload your data file into the dashboard.</p>
</div>
<div class="text-center">
<div class="flex justify-center items-center h-24 w-24 mx-auto bg-purple-100 text-purple-600 rounded-full text-3xl font-bold">3</div>
<h3 class="font-bold text-xl my-4">Clean with AI</h3>
<p class="text-slate-600">Use AI suggestions and our toolkit to fix issues.</p>
</div>
<div class="text-center">
<div class="flex justify-center items-center h-24 w-24 mx-auto bg-indigo-100 text-indigo-600 rounded-full text-3xl font-bold">4</div>
<h3 class="font-bold text-xl my-4">Download</h3>
<p class="text-slate-600">Export your perfectly cleaned dataset.</p>
</div>
</div>
</div>
</section>
</main>
<footer class="bg-slate-800 text-white">
<div class="container mx-auto px-6 py-8 text-center">
<p>© 2025 CleanseFlow. All Rights Reserved.</p>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', () => {
const getPotentialBtn = document.getElementById('get-potential-btn');
const dataDescriptionInput = document.getElementById('data-description');
const potentialOutput = document.getElementById('potential-output');
getPotentialBtn.addEventListener('click', async () => {
const description = dataDescriptionInput.value;
if (!description.trim()) {
potentialOutput.innerHTML = `<div class="p-4 bg-yellow-100 border-l-4 border-yellow-500 text-yellow-800 rounded-r-lg">Please describe your data first.</div>`;
return;
}
potentialOutput.innerHTML = '<div class="flex justify-center items-center p-4"><div class="loader"></div></div>';
const prompt = `A user has data with the following description: "${description}". Based on this, generate a bulleted list of 3-4 potential business or research insights they could uncover if the data is cleaned and analyzed. Frame it as "You could uncover...". Be encouraging and focus on the possibilities.`;
try {
const result = await callGemini(prompt);
potentialOutput.innerHTML = `<div class="p-4 bg-purple-50 border-l-4 border-purple-500 text-purple-800 rounded-r-lg">${result.replace(/\n/g, '<br>').replace(/\*/g, '•')}</div>`;
} catch (error) {
potentialOutput.innerHTML = `<div class="p-4 bg-red-100 border-l-4 border-red-500 text-red-800 rounded-r-lg"><strong>Error:</strong> ${error.message}</div>`;
}
});
async function callGemini(prompt) {
// IMPORTANT: Replace with your actual Gemini API Key
const apiKey = ""; // <-- PASTE YOUR API KEY HERE
if (!apiKey) {
throw new Error("API Key is missing. Please add your Gemini API key to the script.");
}
const apiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=${apiKey}`;
const payload = {
contents: [{ role: "user", parts: [{ text: prompt }] }]
};
const response = await fetch(apiUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
if (!response.ok) {
const errorData = await response.json();
throw new Error(`API request failed. Status: ${response.status}. ${errorData.error.message}`);
}
const result = await response.json();
if (result.candidates && result.candidates.length > 0) {
// Check for safety ratings block
if (result.candidates[0].finishReason === "SAFETY") {
throw new Error("The response was blocked by safety settings. Please adjust your prompt.");
}
return result.candidates[0].content.parts[0].text;
} else {
// This handles cases where the response is empty or blocked without a specific candidate reason.
throw new Error("No response received from the AI. The request may have been blocked or the API key is invalid.");
}
}
});
</script>
</body>
</html>