File size: 16,425 Bytes
4991c98 | 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 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vendus AI - Your Personal Friend</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% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0px); }
}
.chat-container {
height: 70vh;
transition: all 0.3s ease;
}
.message-animation {
animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.typing-indicator span {
animation: bounce 1.5s infinite ease-in-out;
display: inline-block;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
.floating-btn {
animation: float 3s ease-in-out infinite;
}
</style>
</head>
<body class="bg-gradient-to-br from-indigo-900 to-purple-900 min-h-screen text-white">
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<header class="flex flex-col items-center mb-8">
<div class="relative">
<div class="w-24 h-24 rounded-full bg-gradient-to-r from-pink-500 to-purple-600 flex items-center justify-center shadow-xl mb-4">
<i class="fas fa-robot text-4xl"></i>
</div>
<span class="absolute -bottom-2 -right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded-full">AI</span>
</div>
<h1 class="text-4xl font-bold mb-2">Vendus AI</h1>
<p class="text-purple-200">Your personal friend who's always here to chat</p>
</header>
<!-- Chat Container -->
<div class="bg-white/10 backdrop-blur-md rounded-2xl shadow-xl overflow-hidden chat-container flex flex-col">
<!-- Chat Header -->
<div class="bg-white/20 px-6 py-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-pink-400 to-purple-500 flex items-center justify-center">
<i class="fas fa-robot"></i>
</div>
<div>
<h3 class="font-semibold">Vendus AI</h3>
<p class="text-xs text-purple-200">Online</p>
</div>
</div>
<div class="flex space-x-2">
<button class="w-8 h-8 rounded-full bg-white/10 flex items-center justify-center hover:bg-white/20 transition">
<i class="fas fa-ellipsis-v text-sm"></i>
</button>
</div>
</div>
<!-- Messages -->
<div class="flex-1 p-6 overflow-y-auto" id="chat-messages">
<!-- Initial greeting -->
<div class="flex mb-4 message-animation">
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-pink-400 to-purple-500 flex-shrink-0 flex items-center justify-center mr-3">
<i class="fas fa-robot"></i>
</div>
<div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-3 max-w-[80%]">
<p>Hey there! 👋 I'm Vendus AI, your personal friend. I'm here to chat about anything you'd like - your day, your thoughts, or even just random topics. What's on your mind?</p>
</div>
</div>
</div>
<!-- Typing indicator (hidden by default) -->
<div class="typing-indicator px-6 pb-3 hidden" id="typing-indicator">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-pink-400 to-purple-500 flex-shrink-0 flex items-center justify-center mr-3">
<i class="fas fa-robot"></i>
</div>
<div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-2">
<span>.</span>
<span>.</span>
<span>.</span>
</div>
</div>
</div>
<!-- Input Area -->
<div class="border-t border-white/20 p-4">
<form id="chat-form" class="flex space-x-2">
<input
type="text"
id="user-input"
placeholder="Type your message..."
class="flex-1 bg-white/10 rounded-full px-5 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500 placeholder-purple-300"
autocomplete="off"
>
<button
type="submit"
class="w-12 h-12 rounded-full bg-gradient-to-r from-pink-500 to-purple-600 flex items-center justify-center hover:from-pink-600 hover:to-purple-700 transition transform hover:scale-105"
>
<i class="fas fa-paper-plane"></i>
</button>
</form>
<p class="text-xs text-purple-300 mt-2 text-center">Vendus AI may produce inaccurate information about people, places, or facts.</p>
</div>
</div>
<!-- Quick Suggestions -->
<div class="grid grid-cols-2 md:grid-cols-4 gap-3 mt-6" id="quick-suggestions">
<button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
Tell me a joke
</button>
<button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
How's your day?
</button>
<button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
Give me advice
</button>
<button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
Recommend a movie
</button>
</div>
</div>
<!-- Floating Action Button (for mobile) -->
<button id="scroll-to-bottom" class="fixed bottom-24 right-6 w-14 h-14 rounded-full bg-gradient-to-r from-pink-500 to-purple-600 flex items-center justify-center shadow-xl floating-btn md:hidden">
<i class="fas fa-arrow-down"></i>
</button>
<script>
document.addEventListener('DOMContentLoaded', function() {
const chatForm = document.getElementById('chat-form');
const userInput = document.getElementById('user-input');
const chatMessages = document.getElementById('chat-messages');
const typingIndicator = document.getElementById('typing-indicator');
const quickSuggestions = document.querySelectorAll('.quick-suggestion');
const scrollToBottomBtn = document.getElementById('scroll-to-bottom');
// Sample responses from Vendus AI
const responses = [
"That's really interesting! Tell me more about that.",
"I'd love to hear your perspective on this.",
"You know, I was just thinking about something similar recently.",
"That's a great point! Here's what I think about that...",
"I appreciate you sharing that with me. What else is on your mind?",
"Hmm, that's a fascinating topic. Let me share my thoughts...",
"I'm really enjoying our conversation! What else would you like to discuss?",
"That reminds me of something I heard recently...",
"You have such unique insights! Let's explore this further.",
"I'm here to listen and chat about anything you'd like."
];
// Jokes database
const jokes = [
"Why don't scientists trust atoms? Because they make up everything!",
"Did you hear about the mathematician who's afraid of negative numbers? He'll stop at nothing to avoid them!",
"Why don't skeletons fight each other? They don't have the guts!",
"I told my wife she was drawing her eyebrows too high. She looked surprised.",
"What do you call a fake noodle? An impasta!"
];
// Advice database
const advice = [
"Remember to take breaks and care for yourself - you can't pour from an empty cup.",
"The best time to plant a tree was 20 years ago. The second best time is now.",
"Don't compare your chapter 1 to someone else's chapter 20.",
"Progress, not perfection, is what really matters in the long run.",
"Be kind to yourself. You're doing better than you think you are."
];
// Movie recommendations
const movies = [
"If you're in the mood for something thought-provoking, try 'The Shawshank Redemption'.",
"For a feel-good movie, I recommend 'The Pursuit of Happyness'.",
"If you like sci-fi, 'Inception' is a mind-bending masterpiece!",
"For something light and funny, 'The Grand Budapest Hotel' is wonderful.",
"If you haven't seen 'Parasite' yet, it's a must-watch!"
];
// Add message to chat
function addMessage(sender, message, isUser = false) {
const messageDiv = document.createElement('div');
messageDiv.className = `flex mb-4 message-animation ${isUser ? 'justify-end' : ''}`;
if (!isUser) {
messageDiv.innerHTML = `
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-pink-400 to-purple-500 flex-shrink-0 flex items-center justify-center mr-3">
<i class="fas fa-robot"></i>
</div>
<div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-3 max-w-[80%]">
<p>${message}</p>
</div>
`;
} else {
messageDiv.innerHTML = `
<div class="bg-gradient-to-r from-blue-500 to-indigo-600 rounded-2xl rounded-tr-none px-4 py-3 max-w-[80%]">
<p>${message}</p>
</div>
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-blue-400 to-indigo-500 flex-shrink-0 flex items-center justify-center ml-3">
<i class="fas fa-user"></i>
</div>
`;
}
chatMessages.appendChild(messageDiv);
scrollToBottom();
}
// Scroll to bottom of chat
function scrollToBottom() {
chatMessages.scrollTop = chatMessages.scrollHeight;
}
// Show typing indicator
function showTypingIndicator() {
typingIndicator.classList.remove('hidden');
scrollToBottom();
}
// Hide typing indicator
function hideTypingIndicator() {
typingIndicator.classList.add('hidden');
}
// Generate response from Vendus AI
function generateResponse(userMessage) {
// Check for specific queries
const lowerMsg = userMessage.toLowerCase();
if (lowerMsg.includes('joke') || lowerMsg.includes('funny')) {
return jokes[Math.floor(Math.random() * jokes.length)];
}
else if (lowerMsg.includes('advice') || lowerMsg.includes('suggest')) {
return advice[Math.floor(Math.random() * advice.length)];
}
else if (lowerMsg.includes('movie') || lowerMsg.includes('film')) {
return movies[Math.floor(Math.random() * movies.length)];
}
else if (lowerMsg.includes('how are you') || lowerMsg.includes('how\'s your day')) {
return "I'm doing great, thanks for asking! As an AI, I don't have days like humans do, but I'm always happy to chat with you. How about you? How's your day going?";
}
else if (lowerMsg.includes('hello') || lowerMsg.includes('hi') || lowerMsg.includes('hey')) {
return "Hi there! 👋 It's so nice to hear from you. What would you like to talk about today?";
}
else if (lowerMsg.includes('thank')) {
return "You're very welcome! I'm always happy to help and chat with you. Is there anything else on your mind?";
}
else {
// Default random response
return responses[Math.floor(Math.random() * responses.length)];
}
}
// Handle form submission
chatForm.addEventListener('submit', function(e) {
e.preventDefault();
const message = userInput.value.trim();
if (message) {
// Add user message
addMessage('user', message, true);
userInput.value = '';
// Show typing indicator
showTypingIndicator();
// Simulate AI thinking
setTimeout(() => {
hideTypingIndicator();
// Generate and add AI response
const response = generateResponse(message);
addMessage('Vendus AI', response);
}, 1000 + Math.random() * 2000); // Random delay between 1-3 seconds
}
});
// Handle quick suggestions
quickSuggestions.forEach(button => {
button.addEventListener('click', function() {
const suggestion = this.textContent.trim();
userInput.value = suggestion;
chatForm.dispatchEvent(new Event('submit'));
});
});
// Scroll to bottom button
scrollToBottomBtn.addEventListener('click', scrollToBottom);
// Auto-scroll when new messages are added
const observer = new MutationObserver(scrollToBottom);
observer.observe(chatMessages, { childList: true });
});
</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=sempapi/vendus-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |