sandyram commited on
Commit
b569214
Β·
verified Β·
1 Parent(s): 0f60e4f

nice , i want to change the offer type to message type, in that i want to add notice kind of message like a informative message so if there is any general information to be passed it can create. if i am using in mobile, i want to add contact so it can say teh name of the person if in desktop mode it can be just adding name - Initial Deployment

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +307 -18
  3. prompts.txt +22 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Message Ra
3
- emoji: 🐨
4
- colorFrom: green
5
- colorTo: pink
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: message-ra
3
+ emoji: 🐳
4
+ colorFrom: purple
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,308 @@
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>Rasavita - Marketing Message Generator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
11
+ <style>
12
+ .whatsapp-preview {
13
+ background: #e5ddd5;
14
+ border-radius: 12px;
15
+ max-width: 400px;
16
+ min-height: 200px;
17
+ position: relative;
18
+ }
19
+ .whatsapp-preview:before {
20
+ content: "";
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ height: 60px;
26
+ background: #075e54;
27
+ border-radius: 12px 12px 0 0;
28
+ }
29
+ .whatsapp-header {
30
+ position: relative;
31
+ z-index: 1;
32
+ color: white;
33
+ padding: 15px;
34
+ display: flex;
35
+ align-items: center;
36
+ }
37
+ .whatsapp-body {
38
+ padding: 15px;
39
+ margin-top: 30px;
40
+ }
41
+ .message-bubble {
42
+ background: white;
43
+ border-radius: 8px;
44
+ padding: 10px 15px;
45
+ margin-bottom: 10px;
46
+ box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
47
+ max-width: 80%;
48
+ }
49
+ .message-time {
50
+ font-size: 11px;
51
+ color: #667781;
52
+ text-align: right;
53
+ margin-top: 5px;
54
+ }
55
+ </style>
56
+ </head>
57
+ <body class="font-poppins bg-gray-50 min-h-screen">
58
+ <div class="container mx-auto px-4 py-8">
59
+ <div class="text-center mb-8">
60
+ <h1 class="text-3xl font-bold text-amber-700">Rasavita Masala</h1>
61
+ <p class="text-gray-600">Create perfect WhatsApp marketing messages</p>
62
+ </div>
63
+
64
+ <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6">
65
+ <div class="md:flex">
66
+ <div class="md:w-1/2 p-4">
67
+ <h2 class="text-xl font-semibold text-gray-800 mb-4">Create Your Message</h2>
68
+
69
+ <div class="mb-4">
70
+ <label class="block text-gray-700 mb-2">Offer Type</label>
71
+ <select id="offerType" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500">
72
+ <option value="discount">Discount Offer</option>
73
+ <option value="newproduct">New Product Launch</option>
74
+ <option value="festival">Festival Special</option>
75
+ <option value="combo">Combo Offer</option>
76
+ <option value="feedback">Feedback Request</option>
77
+ <option value="notice">Notice/Information</option>
78
+ </select>
79
+ </div>
80
+
81
+ <div id="contactContainer" class="mb-4 hidden">
82
+ <label class="block text-gray-700 mb-2">Contact Name (optional)</label>
83
+ <input type="text" id="contactName" placeholder="Customer name" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500">
84
+ </div>
85
+
86
+ <div id="productContainer" class="mb-4">
87
+ <label class="block text-gray-700 mb-2">Product</label>
88
+ <select id="product" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500">
89
+ <option value="rasam">Rasam Powder</option>
90
+ <option value="sambar">Sambar Powder</option>
91
+ <option value="bisibele">Bisi Bele Bath Powder</option>
92
+ <option value="vangibath">Vangi Bath Powder</option>
93
+ <option value="puliyogare">Puliyogare Powder</option>
94
+ <option value="idlychilli">Idly Chilli Powder</option>
95
+ <option value="curryleaves">Curry Leaves Powder</option>
96
+ <option value="pappulapodi">Pappula Podi</option>
97
+ <option value="bittergourd">Bitter Gourd Powder</option>
98
+ <option value="redchilli">Red Chilli Powder</option>
99
+ <option value="jeera">Jeera Powder</option>
100
+ <option value="methi">Methi Powder</option>
101
+ <option value="dhaniya">Dhaniya Powder</option>
102
+ <option value="garammasala">Garam Masala</option>
103
+ <option value="pongal">Pongal Premix</option>
104
+ <option value="milletpongal">Millet Pongal Premix</option>
105
+ </select>
106
+ </div>
107
+
108
+ <div id="discountContainer" class="mb-4">
109
+ <label class="block text-gray-700 mb-2">Discount (if any)</label>
110
+ <input type="number" id="discount" placeholder="20" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500">
111
+ </div>
112
+
113
+ <div id="validUntilContainer" class="mb-4">
114
+ <label class="block text-gray-700 mb-2">Valid Until</label>
115
+ <input type="date" id="validUntil" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500">
116
+ </div>
117
+
118
+ <div class="mb-4">
119
+ <label class="block text-gray-700 mb-2">Additional Notes</label>
120
+ <textarea id="additionalNotes" rows="3" placeholder="Any special instructions..." class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500"></textarea>
121
+ </div>
122
+
123
+ <button onclick="generateMessage()" class="w-full bg-amber-600 hover:bg-amber-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
124
+ <i data-feather="message-square" class="mr-2"></i> Generate Message
125
+ </button>
126
+ </div>
127
+
128
+ <div class="md:w-1/2 p-4">
129
+ <h2 class="text-xl font-semibold text-gray-800 mb-4">WhatsApp Preview</h2>
130
+ <div class="whatsapp-preview p-0">
131
+ <div class="whatsapp-header">
132
+ <div class="bg-white rounded-full p-1 mr-3">
133
+ <i data-feather="shopping-bag" class="text-amber-600"></i>
134
+ </div>
135
+ <div>
136
+ <p class="font-semibold">Rasavita Masala</p>
137
+ <p class="text-xs">Online</p>
138
+ </div>
139
+ </div>
140
+ <div class="whatsapp-body">
141
+ <div id="messagePreview">
142
+ <div class="message-bubble">
143
+ <p>Your marketing message will appear here...</p>
144
+ <div class="message-time">10:30 AM</div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="mt-6">
151
+ <button onclick="copyToClipboard()" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center mb-3">
152
+ <i data-feather="copy" class="mr-2"></i> Copy Message
153
+ </button>
154
+ <a id="whatsappLink" href="#" class="w-full bg-green-500 hover:bg-green-600 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
155
+ <i data-feather="send" class="mr-2"></i> Open in WhatsApp
156
+ </a>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <script>
164
+ feather.replace();
165
+
166
+ function toggleFields() {
167
+ const offerType = document.getElementById('offerType').value;
168
+ const isFeedback = offerType === 'feedback';
169
+ const isNotice = offerType === 'notice';
170
+ const isMobile = window.innerWidth <= 768;
171
+
172
+ document.getElementById('productContainer').style.display = isFeedback || isNotice ? 'none' : 'block';
173
+ document.getElementById('discountContainer').style.display = isFeedback || isNotice ? 'none' : 'block';
174
+ document.getElementById('validUntilContainer').style.display = isFeedback || isNotice ? 'none' : 'block';
175
+ document.getElementById('contactContainer').style.display = isMobile ? 'block' : 'none';
176
+ }
177
+
178
+ function generateMessage() {
179
+ const offerType = document.getElementById('offerType').value;
180
+ const product = document.getElementById('product').value;
181
+ const discount = document.getElementById('discount').value;
182
+ const validUntil = document.getElementById('validUntil').value;
183
+ const additionalNotes = document.getElementById('additionalNotes').value;
184
+
185
+ // Get product display name
186
+ let productName = '';
187
+ switch(product) {
188
+ case 'rasam': productName = 'Rasam Powder'; break;
189
+ case 'sambar': productName = 'Sambar Powder'; break;
190
+ case 'bisibele': productName = 'Bisi Bele Bath Powder'; break;
191
+ case 'vangibath': productName = 'Vangi Bath Powder'; break;
192
+ case 'puliyogare': productName = 'Puliyogare Powder'; break;
193
+ case 'idlychilli': productName = 'Idly Chilli Powder'; break;
194
+ case 'curryleaves': productName = 'Curry Leaves Powder'; break;
195
+ case 'pappulapodi': productName = 'Pappula Podi'; break;
196
+ case 'bittergourd': productName = 'Bitter Gourd Powder'; break;
197
+ case 'redchilli': productName = 'Red Chilli Powder'; break;
198
+ case 'jeera': productName = 'Jeera Powder'; break;
199
+ case 'methi': productName = 'Methi Powder'; break;
200
+ case 'dhaniya': productName = 'Dhaniya Powder'; break;
201
+ case 'garammasala': productName = 'Garam Masala'; break;
202
+ case 'pongal': productName = 'Pongal Premix'; break;
203
+ case 'milletpongal': productName = 'Millet Pongal Premix'; break;
204
+ }
205
+
206
+ // Format date
207
+ const formattedDate = validUntil ? new Date(validUntil).toLocaleDateString('en-IN', { day: 'numeric', month: 'long' }) : 'limited time';
208
+
209
+ // Generate message based on offer type
210
+ let message = '';
211
+ switch(offerType) {
212
+ case 'feedback':
213
+ message = `πŸ™ *WE VALUE YOUR FEEDBACK!* πŸ™\n\n` +
214
+ `Dear Customer,\n\n` +
215
+ `We would love to hear your thoughts about your recent experience with Rasavita Masala products.\n\n` +
216
+ `Your feedback helps us improve and serve you better!\n\n` +
217
+ `Please share your valuable feedback by replying to this message.\n\n` +
218
+ `Thank you for choosing Rasavita Masala!\n\n` +
219
+ `${additionalNotes ? additionalNotes + '\n\n' : ''}` +
220
+ `#RasavitaMasala #CustomerFirst`;
221
+ break;
222
+ case 'discount':
223
+ message = `πŸ”₯ *SPECIAL OFFER ALERT!* πŸ”₯\n\n` +
224
+ `Get ${discount}% OFF on our premium *${productName}*!\n\n` +
225
+ `🏷️ Original Price: β‚Ή199\n` +
226
+ `πŸ’° Discounted Price: β‚Ή${Math.round(199 * (1 - discount/100))}\n\n` +
227
+ `⏳ Offer valid until ${formattedDate}\n\n` +
228
+ `πŸ›’ Order now: https://rasavita.com/${product}\n\n` +
229
+ `#RasavitaMasala #AuthenticTaste`;
230
+ break;
231
+ case 'newproduct':
232
+ message = `πŸŽ‰ *NEW PRODUCT LAUNCH!* πŸŽ‰\n\n` +
233
+ `We're excited to introduce our new *${productName}*!\n\n` +
234
+ `Experience the authentic Indian flavors like never before.\n\n` +
235
+ `Special introductory price: β‚Ή179 (Limited time only)\n\n` +
236
+ `πŸ›’ Try it now: https://rasavita.com/${product}\n\n` +
237
+ `${additionalNotes ? additionalNotes + '\n\n' : ''}` +
238
+ `#RasavitaMasala #NewFlavors`;
239
+ break;
240
+ case 'festival':
241
+ message = `πŸͺ” *FESTIVAL SPECIAL!* πŸͺ”\n\n` +
242
+ `Celebrate this festive season with our special *${productName}*!\n\n` +
243
+ `🎁 Get ${discount}% OFF + Free Gift with every order above β‚Ή500\n\n` +
244
+ `⏳ Offer valid until ${formattedDate}\n\n` +
245
+ `πŸ›’ Shop now: https://rasavita.com/${product}\n\n` +
246
+ `${additionalNotes ? additionalNotes + '\n\n' : ''}` +
247
+ `#RasavitaMasala #FestiveFlavors`;
248
+ break;
249
+ case 'combo':
250
+ message = `πŸ’ *COMBO OFFER!* πŸ’\n\n` +
251
+ `Get our best-selling masalas together at amazing price!\n\n` +
252
+ `✨ ${productName} + Garam Masala + Chicken Masala\n` +
253
+ `πŸ’° Only β‚Ή499 (Save β‚Ή150)\n\n` +
254
+ `⏳ Offer valid until ${formattedDate}\n\n` +
255
+ `πŸ›’ Grab the deal: https://rasavita.com/combo\n\n` +
256
+ `${additionalNotes ? additionalNotes + '\n\n' : ''}` +
257
+ `#RasavitaMasala #ComboOffer`;
258
+ break;
259
+
260
+ case 'notice':
261
+ const contactName = document.getElementById('contactName').value;
262
+ const greeting = contactName ? `Dear ${contactName},\n\n` : 'Dear Customer,\n\n';
263
+
264
+ message = `πŸ“’ *IMPORTANT NOTICE* πŸ“’\n\n` +
265
+ greeting +
266
+ `${additionalNotes}\n\n` +
267
+ `Thank you,\n` +
268
+ `Team Rasavita Masala\n\n` +
269
+ `#RasavitaMasala #Update`;
270
+ break;
271
+ }
272
+
273
+ // Update preview
274
+ document.getElementById('messagePreview').innerHTML = `
275
+ <div class="message-bubble">
276
+ <p>${message.replace(/\n/g, '<br>')}</p>
277
+ <div class="message-time">${new Date().toLocaleTimeString('en-IN', { hour: '2-digit', minute: '2-digit' })}</div>
278
+ </div>
279
+ `;
280
+
281
+ // Update WhatsApp link
282
+ const whatsappLink = document.getElementById('whatsappLink');
283
+ whatsappLink.href = `https://wa.me/?text=${encodeURIComponent(message)}`;
284
+ }
285
+
286
+ function copyToClipboard() {
287
+ const messageBubble = document.querySelector('#messagePreview .message-bubble');
288
+ const messageText = messageBubble.textContent.replace(/\s+/g, ' ').trim();
289
+
290
+ navigator.clipboard.writeText(messageText).then(() => {
291
+ alert('Message copied to clipboard!');
292
+ }).catch(err => {
293
+ console.error('Failed to copy: ', err);
294
+ });
295
+ }
296
+
297
+ // Set default date to tomorrow
298
+ const tomorrow = new Date();
299
+ tomorrow.setDate(tomorrow.getDate() + 1);
300
+ document.getElementById('validUntil').valueAsDate = tomorrow;
301
+
302
+ // Initialize field visibility
303
+ toggleFields();
304
+ document.getElementById('offerType').addEventListener('change', toggleFields);
305
+ window.addEventListener('resize', toggleFields);
306
+ </script>
307
+ </body>
308
  </html>
prompts.txt ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ make an application for my make marketing messages for my Indian masal brand "Rasavita" i have to say the main content fro this message it has to make a proper whatsapp friend message and preview and then it has to send
2
+ Rasam powder
3
+ Sambar powder
4
+ Bisi bele bath powder
5
+ Vangi bath powder
6
+ Puliyogare powder
7
+ Idly chilli powder
8
+ Curry leaves powder
9
+ Pappula podi
10
+ bitter gourd powder
11
+ Red chilli powder
12
+ Jeera powder
13
+ Methi powder
14
+ Dhaniya powder
15
+ Garam Masala
16
+ Pongal premix
17
+ Millet pongal premix
18
+
19
+ these are teh products, i also want teh feedback message.
20
+ when i choose feedback its should be only t=for feed back coz the products,, discounts and validity are not of use. and make sure its mobile responsie
21
+ when i choose feedback its should be only t=for feed back coz the products,, discounts and validity are not of use. and make sure its mobile responsive
22
+ nice , i want to change the offer type to message type, in that i want to add notice kind of message like a informative message so if there is any general information to be passed it can create. if i am using in mobile, i want to add contact so it can say teh name of the person if in desktop mode it can be just adding name