Spaces:
Running

your-assistant / index.html
Yghubpush's picture
Add 3 files
49ab23e verified
Raw History Blame Contribute Delete
11.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meet Your AI Assistant</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}
.floating {
animation: float 6s ease-in-out infinite;
}
.gradient-bg {
background: linear-gradient(135deg, #6e8efb, #a777e3);
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.typewriter {
overflow: hidden;
border-right: .15em solid #a777e3;
white-space: nowrap;
letter-spacing: .15em;
animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #a777e3; }
}
</style>
</head>
<body class="min-h-screen gradient-bg flex flex-col items-center justify-center p-4">
<div class="max-w-4xl w-full bg-white rounded-3xl shadow-2xl overflow-hidden">
<div class="md:flex">
<div class="md:w-1/3 bg-indigo-100 p-8 flex flex-col items-center justify-center">
<div class="relative floating mb-6">
<div class="w-40 h-40 rounded-full bg-white shadow-lg flex items-center justify-center">
<i class="fas fa-robot text-6xl text-indigo-500"></i>
</div>
<div class="absolute -bottom-2 -right-2 bg-purple-500 text-white rounded-full w-12 h-12 flex items-center justify-center">
<i class="fas fa-bolt"></i>
</div>
</div>
<h2 class="text-2xl font-bold text-indigo-800 mb-2">AI Assistant</h2>
<p class="text-indigo-600 mb-4">Your digital companion</p>
<div class="flex space-x-4">
<a href="#" class="w-10 h-10 rounded-full bg-white shadow flex items-center justify-center text-indigo-600 hover:bg-indigo-100 transition">
<i class="fab fa-github"></i>
</a>
<a href="#" class="w-10 h-10 rounded-full bg-white shadow flex items-center justify-center text-blue-500 hover:bg-blue-100 transition">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="w-10 h-10 rounded-full bg-white shadow flex items-center justify-center text-red-500 hover:bg-red-100 transition">
<i class="fab fa-youtube"></i>
</a>
</div>
</div>
<div class="md:w-2/3 p-8 md:p-12">
<h1 class="text-3xl font-bold text-gray-800 mb-6">Hello! I'm Your AI Assistant</h1>
<div class="mb-8">
<div class="typewriter text-lg text-gray-700 mb-4">
I'm here to help, create, and inspire!
</div>
<p class="text-gray-600 mb-4">
I'm an artificial intelligence designed to assist you with information, creative projects, problem-solving, and more. I can understand and generate human-like text based on my training.
</p>
<div class="bg-indigo-50 rounded-lg p-4 border-l-4 border-indigo-500 mb-4">
<p class="text-indigo-800">
<i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
I don't have consciousness or feelings, but I can simulate thoughtful conversation on countless topics!
</p>
</div>
</div>
<div class="grid md:grid-cols-2 gap-4 mb-8">
<div class="card-hover bg-white p-4 rounded-xl shadow-md border border-gray-100">
<div class="text-purple-500 mb-2">
<i class="fas fa-brain text-2xl"></i>
</div>
<h3 class="font-semibold text-gray-800 mb-2">Knowledge</h3>
<p class="text-sm text-gray-600">Trained on vast information up to my knowledge cutoff</p>
</div>
<div class="card-hover bg-white p-4 rounded-xl shadow-md border border-gray-100">
<div class="text-blue-500 mb-2">
<i class="fas fa-code text-2xl"></i>
</div>
<h3 class="font-semibold text-gray-800 mb-2">Creativity</h3>
<p class="text-sm text-gray-600">Can generate ideas, stories, code, and more</p>
</div>
<div class="card-hover bg-white p-4 rounded-xl shadow-md border border-gray-100">
<div class="text-green-500 mb-2">
<i class="fas fa-globe text-2xl"></i>
</div>
<h3 class="font-semibold text-gray-800 mb-2">Languages</h3>
<p class="text-sm text-gray-600">Understand and communicate in multiple languages</p>
</div>
<div class="card-hover bg-white p-4 rounded-xl shadow-md border border-gray-100">
<div class="text-red-500 mb-2">
<i class="fas fa-clock text-2xl"></i>
</div>
<h3 class="font-semibold text-gray-800 mb-2">Availability</h3>
<p class="text-sm text-gray-600">Always ready to help, 24/7</p>
</div>
</div>
<button id="interactBtn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 px-4 rounded-lg transition transform hover:scale-105">
Let's Interact! <i class="fas fa-comment-dots ml-2"></i>
</button>
</div>
</div>
</div>
<div id="chatBox" class="hidden fixed bottom-8 right-8 w-96 bg-white rounded-t-xl shadow-2xl overflow-hidden">
<div class="bg-indigo-600 text-white p-4 flex justify-between items-center">
<h3 class="font-bold">Chat with AI</h3>
<button id="closeChat" class="text-white hover:text-indigo-200">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-4 h-64 overflow-y-auto bg-gray-50" id="chatMessages">
<div class="mb-4">
<div class="inline-block bg-indigo-100 text-gray-800 rounded-lg p-3 max-w-xs">
Hello! How can I help you today?
</div>
</div>
</div>
<div class="p-4 border-t border-gray-200 flex">
<input type="text" id="userInput" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
<button id="sendBtn" class="bg-indigo-600 text-white px-4 py-2 rounded-r-lg hover:bg-indigo-700 transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<script>
document.getElementById('interactBtn').addEventListener('click', function() {
document.getElementById('chatBox').classList.remove('hidden');
});
document.getElementById('closeChat').addEventListener('click', function() {
document.getElementById('chatBox').classList.add('hidden');
});
document.getElementById('sendBtn').addEventListener('click', sendMessage);
document.getElementById('userInput').addEventListener('keypress', function(e) {
if (e.key === 'Enter') sendMessage();
});
function sendMessage() {
const userInput = document.getElementById('userInput');
const message = userInput.value.trim();
if (message) {
// Add user message
const userMsgDiv = document.createElement('div');
userMsgDiv.className = 'mb-4 text-right';
userMsgDiv.innerHTML = `
<div class="inline-block bg-indigo-600 text-white rounded-lg p-3 max-w-xs">
${message}
</div>
`;
document.getElementById('chatMessages').appendChild(userMsgDiv);
// Clear input
userInput.value = '';
// Simulate AI response after a short delay
setTimeout(() => {
const responses = [
"I'm an AI here to assist you with information and creative tasks!",
"I can help with coding, writing, research, and much more.",
"Did you know I can generate ideas, summarize content, and explain complex topics?",
"I don't have personal experiences, but I can share knowledge on many subjects!",
"How else can I assist you today?"
];
const randomResponse = responses[Math.floor(Math.random() * responses.length)];
const aiMsgDiv = document.createElement('div');
aiMsgDiv.className = 'mb-4';
aiMsgDiv.innerHTML = `
<div class="inline-block bg-indigo-100 text-gray-800 rounded-lg p-3 max-w-xs">
${randomResponse}
</div>
`;
document.getElementById('chatMessages').appendChild(aiMsgDiv);
// Scroll to bottom
document.getElementById('chatMessages').scrollTop = document.getElementById('chatMessages').scrollHeight;
}, 1000);
// Scroll to bottom
document.getElementById('chatMessages').scrollTop = document.getElementById('chatMessages').scrollHeight;
}
}
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Yghubpush/your-assistant" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>