Spaces:
Runtime error
Runtime error
Create index.html
Browse files- index.html +56 -0
index.html
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI Tool Finder</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
</head>
|
| 9 |
+
<body class="bg-gray-100 flex flex-col items-center justify-center h-screen">
|
| 10 |
+
<div class="text-center">
|
| 11 |
+
<h1 class="text-4xl font-bold text-gray-800 mb-4">AI Tool Finder</h1>
|
| 12 |
+
<p class="text-gray-600 mb-6">Find the best AI tools instantly</p>
|
| 13 |
+
|
| 14 |
+
<div class="w-full max-w-md mx-auto">
|
| 15 |
+
<input type="text" id="searchInput" class="w-full px-4 py-2 border rounded-lg shadow-md focus:outline-none focus:ring-2 focus:ring-blue-400" placeholder="Search for AI tools...">
|
| 16 |
+
<button onclick="searchTools()" class="mt-4 px-6 py-2 bg-blue-600 text-white rounded-lg shadow hover:bg-blue-700">Search</button>
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<div id="results" class="mt-6 w-full max-w-md text-left"></div>
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
<script>
|
| 23 |
+
function searchTools() {
|
| 24 |
+
const query = document.getElementById('searchInput').value.trim();
|
| 25 |
+
const resultsDiv = document.getElementById('results');
|
| 26 |
+
resultsDiv.innerHTML = "";
|
| 27 |
+
|
| 28 |
+
if (query === "") {
|
| 29 |
+
resultsDiv.innerHTML = "<p class='text-red-500'>Please enter a search query.</p>";
|
| 30 |
+
return;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
// Simulated tool search (Replace with real API call)
|
| 34 |
+
const tools = [
|
| 35 |
+
{ name: "ChatGPT", description: "AI-powered chatbot and writing assistant." },
|
| 36 |
+
{ name: "DALL路E", description: "AI image generation tool." },
|
| 37 |
+
{ name: "Midjourney", description: "AI-driven art generation platform." },
|
| 38 |
+
{ name: "Stable Diffusion", description: "AI-powered deep learning model for image generation." },
|
| 39 |
+
];
|
| 40 |
+
|
| 41 |
+
const filteredTools = tools.filter(tool => tool.name.toLowerCase().includes(query.toLowerCase()));
|
| 42 |
+
|
| 43 |
+
if (filteredTools.length > 0) {
|
| 44 |
+
filteredTools.forEach(tool => {
|
| 45 |
+
resultsDiv.innerHTML += `<div class='p-4 bg-white rounded-lg shadow-md mb-2'>
|
| 46 |
+
<h3 class='font-semibold text-lg'>${tool.name}</h3>
|
| 47 |
+
<p class='text-gray-600'>${tool.description}</p>
|
| 48 |
+
</div>`;
|
| 49 |
+
});
|
| 50 |
+
} else {
|
| 51 |
+
resultsDiv.innerHTML = "<p class='text-gray-600'>No results found.</p>";
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
</script>
|
| 55 |
+
</body>
|
| 56 |
+
</html>
|