derickbaah8 commited on
Commit
9800a00
·
verified ·
1 Parent(s): 2d820f7

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +358 -19
  3. prompts.txt +2 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: 'Y'
3
- emoji: 📈
4
- colorFrom: pink
5
  colorTo: purple
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: y
3
+ emoji: 🐳
4
+ colorFrom: gray
5
  colorTo: purple
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,358 @@
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>AI Assistant for Peaceful Pose Mats</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
+ .chat-container {
11
+ transition: all 0.3s ease;
12
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
13
+ }
14
+ .message {
15
+ animation: fadeIn 0.3s ease;
16
+ }
17
+ @keyframes fadeIn {
18
+ from { opacity: 0; transform: translateY(10px); }
19
+ to { opacity: 1; transform: translateY(0); }
20
+ }
21
+ .typing-indicator span {
22
+ animation: bounce 1.5s infinite ease-in-out;
23
+ display: inline-block;
24
+ }
25
+ .typing-indicator span:nth-child(2) {
26
+ animation-delay: 0.2s;
27
+ }
28
+ .typing-indicator span:nth-child(3) {
29
+ animation-delay: 0.4s;
30
+ }
31
+ @keyframes bounce {
32
+ 0%, 100% { transform: translateY(0); }
33
+ 50% { transform: translateY(-5px); }
34
+ }
35
+ .product-card {
36
+ transition: transform 0.2s ease;
37
+ }
38
+ .product-card:hover {
39
+ transform: translateY(-2px);
40
+ }
41
+ .quick-reply {
42
+ transition: all 0.2s ease;
43
+ }
44
+ .quick-reply:hover {
45
+ transform: scale(1.02);
46
+ background-color: #f0f9ff;
47
+ }
48
+ </style>
49
+ </head>
50
+ <body>
51
+ <!-- Floating Action Button -->
52
+ <button id="chatToggle" class="fixed bottom-8 right-8 bg-indigo-600 hover:bg-indigo-700 text-white w-16 h-16 rounded-full flex items-center justify-center shadow-lg z-50 transition-all duration-300 hover:scale-110">
53
+ <i class="fas fa-robot text-2xl"></i>
54
+ </button>
55
+
56
+ <!-- Chat Container -->
57
+ <div id="chatContainer" class="fixed bottom-24 right-8 w-96 max-w-full bg-white rounded-lg shadow-xl overflow-hidden hidden flex flex-col z-50 border border-gray-200">
58
+ <!-- Chat Header -->
59
+ <div class="bg-indigo-600 text-white p-4 flex justify-between items-center">
60
+ <div class="flex items-center space-x-3">
61
+ <img src="https://via.placeholder.com/30" alt="Peaceful Pose Mats Logo" class="h-6 w-6 rounded-full">
62
+ <h3 class="font-semibold">Peaceful Pose Mats AI</h3>
63
+ </div>
64
+ <div class="flex space-x-2">
65
+ <button id="minimizeChat" class="text-white hover:text-indigo-200 focus:outline-none">
66
+ <i class="fas fa-minus"></i>
67
+ </button>
68
+ <button id="closeChat" class="text-white hover:text-indigo-200 focus:outline-none">
69
+ <i class="fas fa-times"></i>
70
+ </button>
71
+ </div>
72
+ </div>
73
+
74
+ <!-- Chat Messages -->
75
+ <div id="chatMessages" class="flex-1 p-4 overflow-y-auto bg-gray-50" style="height: 400px;">
76
+ <div class="message mb-4">
77
+ <div class="bg-indigo-100 text-indigo-900 rounded-lg p-3 max-w-xs md:max-w-md">
78
+ <p>Namaste! 🙏 I'm your AI assistant for Peaceful Pose Mats. How can I help you with our premium yoga mats today?</p>
79
+ </div>
80
+ <p class="text-xs text-gray-500 mt-1">Just now</p>
81
+
82
+ <!-- Quick Reply Buttons -->
83
+ <div class="mt-3 flex flex-wrap gap-2">
84
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="Show me your best sellers">
85
+ Best Sellers
86
+ </button>
87
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="Track my order">
88
+ Track Order
89
+ </button>
90
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="What's your return policy?">
91
+ Return Policy
92
+ </button>
93
+ </div>
94
+ </div>
95
+ </div>
96
+
97
+ <!-- Chat Input -->
98
+ <div class="border-t border-gray-200 p-4 bg-white">
99
+ <div class="flex space-x-2">
100
+ <input id="userInput" type="text" placeholder="Ask about yoga mats, orders, or support..." class="flex-1 border border-gray-300 rounded-full px-4 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
101
+ <button id="sendMessage" class="bg-indigo-600 hover:bg-indigo-700 text-white rounded-full w-10 h-10 flex items-center justify-center">
102
+ <i class="fas fa-paper-plane"></i>
103
+ </button>
104
+ </div>
105
+ <div class="mt-2 text-xs text-gray-500 flex justify-between">
106
+ <p>Ask about products, orders, or store management.</p>
107
+ <a href="https://peacefulposemats.com" target="_blank" class="text-indigo-600 hover:underline">Visit Store</a>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Minimized Chat -->
113
+ <div id="minimizedChat" class="fixed bottom-24 right-8 bg-indigo-600 text-white rounded-t-lg p-3 hidden items-center justify-between shadow-lg z-50 cursor-pointer" style="width: 200px;">
114
+ <div class="flex items-center space-x-2">
115
+ <i class="fas fa-robot"></i>
116
+ <span>Peaceful Pose AI</span>
117
+ </div>
118
+ <button id="restoreChat" class="text-white hover:text-indigo-200 focus:outline-none">
119
+ <i class="fas fa-plus"></i>
120
+ </button>
121
+ </div>
122
+
123
+ <script>
124
+ // DOM Elements
125
+ const chatToggle = document.getElementById('chatToggle');
126
+ const chatContainer = document.getElementById('chatContainer');
127
+ const minimizedChat = document.getElementById('minimizedChat');
128
+ const closeChat = document.getElementById('closeChat');
129
+ const minimizeChat = document.getElementById('minimizeChat');
130
+ const restoreChat = document.getElementById('restoreChat');
131
+ const sendMessage = document.getElementById('sendMessage');
132
+ const userInput = document.getElementById('userInput');
133
+ const chatMessages = document.getElementById('chatMessages');
134
+
135
+ // Sample product data from peacefulposemats.com
136
+ const products = [
137
+ {
138
+ id: 1,
139
+ title: "Premium Eco Yoga Mat",
140
+ price: "$79.99",
141
+ image: "https://via.placeholder.com/150?text=Premium+Mat",
142
+ description: "Our best-selling eco-friendly yoga mat with superior grip and cushioning.",
143
+ link: "https://peacefulposemats.com/products/premium-eco-yoga-mat"
144
+ },
145
+ {
146
+ id: 2,
147
+ title: "Travel Yoga Mat",
148
+ price: "$59.99",
149
+ image: "https://via.placeholder.com/150?text=Travel+Mat",
150
+ description: "Lightweight and foldable mat perfect for yogis on the go.",
151
+ link: "https://peacefulposemats.com/products/travel-yoga-mat"
152
+ },
153
+ {
154
+ id: 3,
155
+ title: "Meditation Cushion Set",
156
+ price: "$49.99",
157
+ image: "https://via.placeholder.com/150?text=Cushion+Set",
158
+ description: "Comfortable set for meditation and seated poses.",
159
+ link: "https://peacefulposemats.com/products/meditation-cushion-set"
160
+ }
161
+ ];
162
+
163
+ // Store policies
164
+ const policies = {
165
+ returns: "We accept returns within 30 days of purchase. Items must be unused and in original packaging. Visit our Returns page for more details.",
166
+ shipping: "Free shipping on orders over $50. Domestic orders typically arrive in 3-5 business days. International shipping available.",
167
+ warranty: "All our yoga mats come with a 1-year warranty against manufacturing defects."
168
+ };
169
+
170
+ // Toggle Chat
171
+ chatToggle.addEventListener('click', () => {
172
+ if (chatContainer.classList.contains('hidden')) {
173
+ chatContainer.classList.remove('hidden');
174
+ minimizedChat.classList.add('hidden');
175
+ } else {
176
+ chatContainer.classList.add('hidden');
177
+ }
178
+ });
179
+
180
+ // Close Chat
181
+ closeChat.addEventListener('click', () => {
182
+ chatContainer.classList.add('hidden');
183
+ minimizedChat.classList.add('hidden');
184
+ });
185
+
186
+ // Minimize Chat
187
+ minimizeChat.addEventListener('click', () => {
188
+ chatContainer.classList.add('hidden');
189
+ minimizedChat.classList.remove('hidden');
190
+ });
191
+
192
+ // Restore Chat
193
+ restoreChat.addEventListener('click', () => {
194
+ minimizedChat.classList.add('hidden');
195
+ chatContainer.classList.remove('hidden');
196
+ });
197
+
198
+ // Send Message
199
+ sendMessage.addEventListener('click', sendUserMessage);
200
+ userInput.addEventListener('keypress', (e) => {
201
+ if (e.key === 'Enter') {
202
+ sendUserMessage();
203
+ }
204
+ });
205
+
206
+ // Quick reply buttons
207
+ document.addEventListener('click', (e) => {
208
+ if (e.target.classList.contains('quick-reply')) {
209
+ const replyText = e.target.getAttribute('data-reply');
210
+ userInput.value = replyText;
211
+ sendUserMessage();
212
+ }
213
+ });
214
+
215
+ function sendUserMessage() {
216
+ const message = userInput.value.trim();
217
+ if (message) {
218
+ // Add user message to chat
219
+ addMessage(message, 'user');
220
+ userInput.value = '';
221
+
222
+ // Show typing indicator
223
+ const typingIndicator = document.createElement('div');
224
+ typingIndicator.className = 'message mb-4';
225
+ typingIndicator.innerHTML = `
226
+ <div class="bg-indigo-100 text-indigo-900 rounded-lg p-3 max-w-xs md:max-w-md">
227
+ <div class="typing-indicator">
228
+ <span>.</span>
229
+ <span>.</span>
230
+ <span>.</span>
231
+ </div>
232
+ </div>
233
+ `;
234
+ chatMessages.appendChild(typingIndicator);
235
+ chatMessages.scrollTop = chatMessages.scrollHeight;
236
+
237
+ // Process message and generate response
238
+ setTimeout(() => {
239
+ // Remove typing indicator
240
+ chatMessages.removeChild(typingIndicator);
241
+
242
+ // Generate response based on user input
243
+ generateResponse(message.toLowerCase());
244
+ }, 1500);
245
+ }
246
+ }
247
+
248
+ function generateResponse(message) {
249
+ let response = '';
250
+ let htmlContent = '';
251
+
252
+ // Check for common queries
253
+ if (message.includes('hello') || message.includes('hi') || message.includes('namaste')) {
254
+ response = "Namaste! 🙏 How can I assist you with Peaceful Pose Mats today?";
255
+ }
256
+ else if (message.includes('product') || message.includes('mat') || message.includes('yoga') || message.includes('best seller') || message.includes('best-selling')) {
257
+ // Show products
258
+ response = "Here are our top yoga mats and accessories:";
259
+ htmlContent = `
260
+ <div class="grid grid-cols-1 gap-3 mt-2">
261
+ ${products.map(product => `
262
+ <a href="${product.link}" target="_blank" class="product-card bg-white p-3 rounded-lg border border-gray-200 shadow-sm">
263
+ <div class="flex">
264
+ <img src="${product.image}" alt="${product.title}" class="w-16 h-16 object-cover rounded">
265
+ <div class="ml-3">
266
+ <h4 class="font-medium text-indigo-800">${product.title}</h4>
267
+ <p class="text-sm text-gray-600">${product.description}</p>
268
+ <p class="text-indigo-600 font-semibold mt-1">${product.price}</p>
269
+ </div>
270
+ </div>
271
+ </a>
272
+ `).join('')}
273
+ </div>
274
+ <p class="mt-2 text-sm">You can browse all our products on our <a href="https://peacefulposemats.com/collections/all" target="_blank" class="text-indigo-600 underline">website</a>.</p>
275
+ `;
276
+ }
277
+ else if (message.includes('order') || message.includes('track') || message.includes('delivery')) {
278
+ response = "To track your order, please provide your order number or email address used for purchase. You can also check your order status by visiting our <a href='https://peacefulposemats.com/account' target='_blank' class='text-indigo-600 underline'>order tracking page</a>.";
279
+ }
280
+ else if (message.includes('return') || message.includes('exchange') || message.includes('policy')) {
281
+ response = policies.returns;
282
+ htmlContent = `<p class="mt-2 text-sm">For more details, visit our <a href="https://peacefulposemats.com/pages/returns" target="_blank" class="text-indigo-600 underline">Returns & Exchanges page</a>.</p>`;
283
+ }
284
+ else if (message.includes('shipping') || message.includes('delivery') || message.includes('ship')) {
285
+ response = policies.shipping;
286
+ }
287
+ else if (message.includes('warranty') || message.includes('guarantee')) {
288
+ response = policies.warranty;
289
+ }
290
+ else if (message.includes('contact') || message.includes('help') || message.includes('support')) {
291
+ response = "You can contact our customer support team at support@peacefulposemats.com or call us at (555) 123-4567. Our support hours are Monday-Friday, 9am-5pm PST.";
292
+ }
293
+ else {
294
+ // Default response for unrecognized queries
295
+ response = "I'm here to help with Peaceful Pose Mats products and services. You can ask me about:<br>" +
296
+ "- Our yoga mats and accessories<br>" +
297
+ "- Order tracking and shipping<br>" +
298
+ "- Returns and exchanges<br>" +
299
+ "- Customer support";
300
+ }
301
+
302
+ // Add the response to chat
303
+ addMessage(response, 'ai', htmlContent);
304
+
305
+ // Add quick reply suggestions
306
+ if (!message.includes('product') && !message.includes('mat')) {
307
+ setTimeout(() => {
308
+ const quickReplies = document.createElement('div');
309
+ quickReplies.className = 'mt-3 flex flex-wrap gap-2';
310
+ quickReplies.innerHTML = `
311
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="Show me your yoga mats">
312
+ Browse Mats
313
+ </button>
314
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="How do I track my order?">
315
+ Track Order
316
+ </button>
317
+ <button class="quick-reply bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100" data-reply="What's your shipping policy?">
318
+ Shipping Info
319
+ </button>
320
+ `;
321
+ chatMessages.appendChild(quickReplies);
322
+ chatMessages.scrollTop = chatMessages.scrollHeight;
323
+ }, 300);
324
+ }
325
+ }
326
+
327
+ function addMessage(text, sender, htmlContent = '') {
328
+ const messageDiv = document.createElement('div');
329
+ messageDiv.className = 'message mb-4';
330
+
331
+ if (sender === 'user') {
332
+ messageDiv.innerHTML = `
333
+ <div class="ml-auto bg-indigo-600 text-white rounded-lg p-3 max-w-xs md:max-w-md">
334
+ <p>${text}</p>
335
+ </div>
336
+ <p class="text-xs text-gray-500 mt-1 text-right">Just now</p>
337
+ `;
338
+ } else {
339
+ messageDiv.innerHTML = `
340
+ <div class="bg-indigo-100 text-indigo-900 rounded-lg p-3 max-w-xs md:max-w-md">
341
+ ${text}
342
+ ${htmlContent}
343
+ </div>
344
+ <p class="text-xs text-gray-500 mt-1">Just now</p>
345
+ `;
346
+ }
347
+
348
+ chatMessages.appendChild(messageDiv);
349
+ chatMessages.scrollTop = chatMessages.scrollHeight;
350
+ }
351
+
352
+ // Initialize with a greeting if chat is empty
353
+ if (chatMessages.children.length === 1) {
354
+ // Already has initial greeting
355
+ }
356
+ </script>
357
+ <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=derickbaah8/y" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
358
+ </html>
prompts.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ What code Do I need to Put in my shopify domain in order to access you
2
+ Integrate deep site so to my shopify domain peacefulposemats.com