sempapi commited on
Commit
4991c98
·
verified ·
1 Parent(s): c88fa28

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +323 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Vendus Ai
3
- emoji: 🌍
4
- colorFrom: green
5
  colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: vendus-ai
3
+ emoji: 🐳
4
+ colorFrom: pink
5
  colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,323 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Vendus AI - Your Personal Friend</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes float {
11
+ 0% { transform: translateY(0px); }
12
+ 50% { transform: translateY(-10px); }
13
+ 100% { transform: translateY(0px); }
14
+ }
15
+
16
+ .chat-container {
17
+ height: 70vh;
18
+ transition: all 0.3s ease;
19
+ }
20
+
21
+ .message-animation {
22
+ animation: fadeIn 0.3s ease-out;
23
+ }
24
+
25
+ @keyframes fadeIn {
26
+ from { opacity: 0; transform: translateY(10px); }
27
+ to { opacity: 1; transform: translateY(0); }
28
+ }
29
+
30
+ .typing-indicator span {
31
+ animation: bounce 1.5s infinite ease-in-out;
32
+ display: inline-block;
33
+ }
34
+
35
+ .typing-indicator span:nth-child(2) {
36
+ animation-delay: 0.2s;
37
+ }
38
+
39
+ .typing-indicator span:nth-child(3) {
40
+ animation-delay: 0.4s;
41
+ }
42
+
43
+ @keyframes bounce {
44
+ 0%, 100% { transform: translateY(0); }
45
+ 50% { transform: translateY(-5px); }
46
+ }
47
+
48
+ .floating-btn {
49
+ animation: float 3s ease-in-out infinite;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body class="bg-gradient-to-br from-indigo-900 to-purple-900 min-h-screen text-white">
54
+ <div class="container mx-auto px-4 py-8">
55
+ <!-- Header -->
56
+ <header class="flex flex-col items-center mb-8">
57
+ <div class="relative">
58
+ <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">
59
+ <i class="fas fa-robot text-4xl"></i>
60
+ </div>
61
+ <span class="absolute -bottom-2 -right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded-full">AI</span>
62
+ </div>
63
+ <h1 class="text-4xl font-bold mb-2">Vendus AI</h1>
64
+ <p class="text-purple-200">Your personal friend who's always here to chat</p>
65
+ </header>
66
+
67
+ <!-- Chat Container -->
68
+ <div class="bg-white/10 backdrop-blur-md rounded-2xl shadow-xl overflow-hidden chat-container flex flex-col">
69
+ <!-- Chat Header -->
70
+ <div class="bg-white/20 px-6 py-4 flex items-center justify-between">
71
+ <div class="flex items-center space-x-3">
72
+ <div class="w-10 h-10 rounded-full bg-gradient-to-r from-pink-400 to-purple-500 flex items-center justify-center">
73
+ <i class="fas fa-robot"></i>
74
+ </div>
75
+ <div>
76
+ <h3 class="font-semibold">Vendus AI</h3>
77
+ <p class="text-xs text-purple-200">Online</p>
78
+ </div>
79
+ </div>
80
+ <div class="flex space-x-2">
81
+ <button class="w-8 h-8 rounded-full bg-white/10 flex items-center justify-center hover:bg-white/20 transition">
82
+ <i class="fas fa-ellipsis-v text-sm"></i>
83
+ </button>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Messages -->
88
+ <div class="flex-1 p-6 overflow-y-auto" id="chat-messages">
89
+ <!-- Initial greeting -->
90
+ <div class="flex mb-4 message-animation">
91
+ <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">
92
+ <i class="fas fa-robot"></i>
93
+ </div>
94
+ <div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-3 max-w-[80%]">
95
+ <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>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Typing indicator (hidden by default) -->
101
+ <div class="typing-indicator px-6 pb-3 hidden" id="typing-indicator">
102
+ <div class="flex items-center">
103
+ <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">
104
+ <i class="fas fa-robot"></i>
105
+ </div>
106
+ <div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-2">
107
+ <span>.</span>
108
+ <span>.</span>
109
+ <span>.</span>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <!-- Input Area -->
115
+ <div class="border-t border-white/20 p-4">
116
+ <form id="chat-form" class="flex space-x-2">
117
+ <input
118
+ type="text"
119
+ id="user-input"
120
+ placeholder="Type your message..."
121
+ 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"
122
+ autocomplete="off"
123
+ >
124
+ <button
125
+ type="submit"
126
+ 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"
127
+ >
128
+ <i class="fas fa-paper-plane"></i>
129
+ </button>
130
+ </form>
131
+ <p class="text-xs text-purple-300 mt-2 text-center">Vendus AI may produce inaccurate information about people, places, or facts.</p>
132
+ </div>
133
+ </div>
134
+
135
+ <!-- Quick Suggestions -->
136
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-3 mt-6" id="quick-suggestions">
137
+ <button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
138
+ Tell me a joke
139
+ </button>
140
+ <button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
141
+ How's your day?
142
+ </button>
143
+ <button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
144
+ Give me advice
145
+ </button>
146
+ <button class="quick-suggestion bg-white/10 hover:bg-white/20 rounded-full px-4 py-2 text-sm transition">
147
+ Recommend a movie
148
+ </button>
149
+ </div>
150
+ </div>
151
+
152
+ <!-- Floating Action Button (for mobile) -->
153
+ <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">
154
+ <i class="fas fa-arrow-down"></i>
155
+ </button>
156
+
157
+ <script>
158
+ document.addEventListener('DOMContentLoaded', function() {
159
+ const chatForm = document.getElementById('chat-form');
160
+ const userInput = document.getElementById('user-input');
161
+ const chatMessages = document.getElementById('chat-messages');
162
+ const typingIndicator = document.getElementById('typing-indicator');
163
+ const quickSuggestions = document.querySelectorAll('.quick-suggestion');
164
+ const scrollToBottomBtn = document.getElementById('scroll-to-bottom');
165
+
166
+ // Sample responses from Vendus AI
167
+ const responses = [
168
+ "That's really interesting! Tell me more about that.",
169
+ "I'd love to hear your perspective on this.",
170
+ "You know, I was just thinking about something similar recently.",
171
+ "That's a great point! Here's what I think about that...",
172
+ "I appreciate you sharing that with me. What else is on your mind?",
173
+ "Hmm, that's a fascinating topic. Let me share my thoughts...",
174
+ "I'm really enjoying our conversation! What else would you like to discuss?",
175
+ "That reminds me of something I heard recently...",
176
+ "You have such unique insights! Let's explore this further.",
177
+ "I'm here to listen and chat about anything you'd like."
178
+ ];
179
+
180
+ // Jokes database
181
+ const jokes = [
182
+ "Why don't scientists trust atoms? Because they make up everything!",
183
+ "Did you hear about the mathematician who's afraid of negative numbers? He'll stop at nothing to avoid them!",
184
+ "Why don't skeletons fight each other? They don't have the guts!",
185
+ "I told my wife she was drawing her eyebrows too high. She looked surprised.",
186
+ "What do you call a fake noodle? An impasta!"
187
+ ];
188
+
189
+ // Advice database
190
+ const advice = [
191
+ "Remember to take breaks and care for yourself - you can't pour from an empty cup.",
192
+ "The best time to plant a tree was 20 years ago. The second best time is now.",
193
+ "Don't compare your chapter 1 to someone else's chapter 20.",
194
+ "Progress, not perfection, is what really matters in the long run.",
195
+ "Be kind to yourself. You're doing better than you think you are."
196
+ ];
197
+
198
+ // Movie recommendations
199
+ const movies = [
200
+ "If you're in the mood for something thought-provoking, try 'The Shawshank Redemption'.",
201
+ "For a feel-good movie, I recommend 'The Pursuit of Happyness'.",
202
+ "If you like sci-fi, 'Inception' is a mind-bending masterpiece!",
203
+ "For something light and funny, 'The Grand Budapest Hotel' is wonderful.",
204
+ "If you haven't seen 'Parasite' yet, it's a must-watch!"
205
+ ];
206
+
207
+ // Add message to chat
208
+ function addMessage(sender, message, isUser = false) {
209
+ const messageDiv = document.createElement('div');
210
+ messageDiv.className = `flex mb-4 message-animation ${isUser ? 'justify-end' : ''}`;
211
+
212
+ if (!isUser) {
213
+ messageDiv.innerHTML = `
214
+ <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">
215
+ <i class="fas fa-robot"></i>
216
+ </div>
217
+ <div class="bg-white/20 rounded-2xl rounded-tl-none px-4 py-3 max-w-[80%]">
218
+ <p>${message}</p>
219
+ </div>
220
+ `;
221
+ } else {
222
+ messageDiv.innerHTML = `
223
+ <div class="bg-gradient-to-r from-blue-500 to-indigo-600 rounded-2xl rounded-tr-none px-4 py-3 max-w-[80%]">
224
+ <p>${message}</p>
225
+ </div>
226
+ <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">
227
+ <i class="fas fa-user"></i>
228
+ </div>
229
+ `;
230
+ }
231
+
232
+ chatMessages.appendChild(messageDiv);
233
+ scrollToBottom();
234
+ }
235
+
236
+ // Scroll to bottom of chat
237
+ function scrollToBottom() {
238
+ chatMessages.scrollTop = chatMessages.scrollHeight;
239
+ }
240
+
241
+ // Show typing indicator
242
+ function showTypingIndicator() {
243
+ typingIndicator.classList.remove('hidden');
244
+ scrollToBottom();
245
+ }
246
+
247
+ // Hide typing indicator
248
+ function hideTypingIndicator() {
249
+ typingIndicator.classList.add('hidden');
250
+ }
251
+
252
+ // Generate response from Vendus AI
253
+ function generateResponse(userMessage) {
254
+ // Check for specific queries
255
+ const lowerMsg = userMessage.toLowerCase();
256
+
257
+ if (lowerMsg.includes('joke') || lowerMsg.includes('funny')) {
258
+ return jokes[Math.floor(Math.random() * jokes.length)];
259
+ }
260
+ else if (lowerMsg.includes('advice') || lowerMsg.includes('suggest')) {
261
+ return advice[Math.floor(Math.random() * advice.length)];
262
+ }
263
+ else if (lowerMsg.includes('movie') || lowerMsg.includes('film')) {
264
+ return movies[Math.floor(Math.random() * movies.length)];
265
+ }
266
+ else if (lowerMsg.includes('how are you') || lowerMsg.includes('how\'s your day')) {
267
+ 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?";
268
+ }
269
+ else if (lowerMsg.includes('hello') || lowerMsg.includes('hi') || lowerMsg.includes('hey')) {
270
+ return "Hi there! 👋 It's so nice to hear from you. What would you like to talk about today?";
271
+ }
272
+ else if (lowerMsg.includes('thank')) {
273
+ return "You're very welcome! I'm always happy to help and chat with you. Is there anything else on your mind?";
274
+ }
275
+ else {
276
+ // Default random response
277
+ return responses[Math.floor(Math.random() * responses.length)];
278
+ }
279
+ }
280
+
281
+ // Handle form submission
282
+ chatForm.addEventListener('submit', function(e) {
283
+ e.preventDefault();
284
+ const message = userInput.value.trim();
285
+
286
+ if (message) {
287
+ // Add user message
288
+ addMessage('user', message, true);
289
+ userInput.value = '';
290
+
291
+ // Show typing indicator
292
+ showTypingIndicator();
293
+
294
+ // Simulate AI thinking
295
+ setTimeout(() => {
296
+ hideTypingIndicator();
297
+
298
+ // Generate and add AI response
299
+ const response = generateResponse(message);
300
+ addMessage('Vendus AI', response);
301
+ }, 1000 + Math.random() * 2000); // Random delay between 1-3 seconds
302
+ }
303
+ });
304
+
305
+ // Handle quick suggestions
306
+ quickSuggestions.forEach(button => {
307
+ button.addEventListener('click', function() {
308
+ const suggestion = this.textContent.trim();
309
+ userInput.value = suggestion;
310
+ chatForm.dispatchEvent(new Event('submit'));
311
+ });
312
+ });
313
+
314
+ // Scroll to bottom button
315
+ scrollToBottomBtn.addEventListener('click', scrollToBottom);
316
+
317
+ // Auto-scroll when new messages are added
318
+ const observer = new MutationObserver(scrollToBottom);
319
+ observer.observe(chatMessages, { childList: true });
320
+ });
321
+ </script>
322
+ <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>
323
+ </html>
prompts.txt ADDED
File without changes