euychrue commited on
Commit
eb6f430
·
verified ·
1 Parent(s): 591dd24

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +426 -346
index.html CHANGED
@@ -1,352 +1,404 @@
1
  <!DOCTYPE html>
2
  <html lang="he" dir="rtl">
 
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>צ'אאט בינה מל מלאכותית - ס סגנון צברי</title>
7
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
- <style>
9
- :root {
10
- --primary-color: #0056b3;
11
- --secondary-color: #ffd700;
12
- --accent-color: #d40000;
13
- --bg-color: #f5f5f5;
14
- --chat-bg: #ffffff;
15
- --text-color: #333;
16
- --user-bubble: #e3f2fd;
17
- --ai-bubble: #f1f1f1;
18
- }
19
-
20
- * {
21
- margin: 0;
22
- padding: 0;
23
- box-sizing: border-box;
24
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
25
- }
26
-
27
- body {
28
- background-color: var(--bg-color);
29
- color: var(--text-color);
30
- direction: rtl;
31
- }
32
-
33
- .header {
34
- background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
35
- color: white;
36
- padding: 1rem;
37
- text-align: center;
38
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
39
- position: relative;
40
- }
41
-
42
- .header h1 {
43
- font-size: 1.8rem;
44
- margin-bottom: 0.5rem;
45
- font-weight: bold;
46
- }
47
-
48
- .header p {
49
- font-size: 0.9rem;
50
- opacity: 0.9;
51
- }
52
-
53
- .header a {
54
- position: absolute;
55
- left: 1rem;
56
- top: 50%;
57
- transform: translateY(-50%);
58
- color: white;
59
- text-decoration: none;
60
- font-size: 0.8rem;
61
- }
62
-
63
- .container {
64
- max-width: 1000px;
65
- margin: 0 auto;
66
- padding: 1rem;
67
- }
68
-
69
- .chat-container {
70
- background-color: var(--chat-bg);
71
- border-radius: 10px;
72
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
73
- overflow: hidden;
74
- height: 70vh;
75
- display: flex;
76
- flex-direction: column;
77
- }
78
-
79
- .chat-messages {
80
- flex: 1;
81
- padding: 1rem;
82
- overflow-y: auto;
83
- display: flex;
84
- flex-direction: column;
85
- gap: 1rem;
86
- }
87
-
88
- .message {
89
- max-width: 80%;
90
- padding: 0.8rem 1rem;
91
- border-radius: 15px;
92
- line-height: 1.4;
93
- position: relative;
94
- animation: fadeIn 0.3s ease;
95
- }
96
-
97
- @keyframes fadeIn {
98
- from { opacity: 0; transform: translateY(10px); }
99
- to { opacity: 1; transform: translateY(0); }
100
- }
101
-
102
- .user-message {
103
- align-self: flex-end;
104
- background-color: var(--user-bubble);
105
- border-bottom-right-radius: 5px;
106
- color: #000;
107
- font-weight: 500;
108
- }
109
-
110
- .ai-message {
111
- align-self: flex-start;
112
- background-color: var(--ai-bubble);
113
- border-bottom-left-radius: 5px;
114
- color: #000;
115
- font-weight: bold;
116
- }
117
-
118
- .ai-message::before {
119
- content: "🤖";
120
- margin-left: 5px;
121
- }
122
-
123
- .user-message::before {
124
- content: "👤";
125
- margin-right: 5px;
126
- }
127
-
128
- .input-area {
129
- display: flex;
130
- padding: 1rem;
131
- background-color: #fff;
132
- border-top: 1px solid #eee;
133
- gap: 0.5rem;
134
- }
135
-
136
- .input-area input {
137
- flex: 1;
138
- padding: 0.8rem 1rem;
139
- border: 1px solid #ddd;
140
- border-radius: 25px;
141
- font-size: 1rem;
142
- outline: none;
143
- transition: border 0.3s;
144
- }
145
-
146
- .input-area input:focus {
147
- border-color: var(--primary-color);
148
- }
149
-
150
- .input-area button {
151
- background-color: var(--primary-color);
152
- color: white;
153
- border: none;
154
- border-radius: 25px;
155
- padding: 0 1.5rem;
156
- cursor: pointer;
157
- font-weight: bold;
158
- transition: background 0.3s;
159
- }
160
-
161
- .input-area button:hover {
162
- background-color: #003d82;
163
- }
164
-
165
- .file-upload {
166
- position: relative;
167
- width: 40px;
168
- height: 40px;
169
- display: flex;
170
- align-items: center;
171
- justify-content: center;
172
- border-radius: 50%;
173
- background-color: var(--secondary-color);
174
- color: #333;
175
- cursor: pointer;
176
- }
177
-
178
- .file-upload input {
179
- position: absolute;
180
- width: 100%;
181
- height: 100%;
182
- opacity: 0;
183
- cursor: pointer;
184
- }
185
-
186
- .typing-indicator {
187
- display: flex;
188
- align-items: center;
189
- gap: 5px;
190
- padding: 0.5rem 1rem;
191
- background-color: var(--ai-bubble);
192
- border-radius: 15px;
193
- align-self: flex-start;
194
- margin-bottom: 0.5rem;
195
- display: none;
196
- }
197
-
198
- .typing-dot {
199
- width: 8px;
200
- height: 8px;
201
- background-color: #666;
202
- border-radius: 50%;
203
- animation: typingAnimation 1.4s infinite ease-in-out;
204
- }
205
-
206
- .typing-dot:nth-child(1) {
207
- animation-delay: 0s;
208
- }
209
-
210
- .typing-dot:nth-child(2) {
211
- animation-delay: 0.2s;
212
- }
213
-
214
- .typing-dot:nth-child(3) {
215
- animation-delay: 0.4s;
216
- }
217
-
218
- @keyframes typingAnimation {
219
- 0%, 60%, 100% { transform: translateY(0); }
220
- 30% { transform: translateY(-5px); }
221
- }
222
-
223
- .uploaded-file {
224
- display: inline-block;
225
- margin-top: 0.5rem;
226
- padding: 0.5rem;
227
- background-color: rgba(0, 0, 0, 0.05);
228
- border-radius: 5px;
229
- font-size: 0.8rem;
230
- }
231
-
232
- .uploaded-file i {
233
- margin-left: 5px;
234
- }
235
-
236
- .uploaded-image {
237
- max-width: 200px;
238
- max-height: 200px;
239
- border-radius: 10px;
240
- margin-top: 0.5rem;
241
- cursor: pointer;
242
- transition: transform 0.2s;
243
- }
244
-
245
- .uploaded-image:hover {
246
- transform: scale(1.05);
247
- }
248
-
249
- @media (max-width: 768px) {
250
- .chat-container {
251
- height: 80vh;
252
- }
253
-
254
- .message {
255
- max-width: 90%;
256
- }
257
-
258
- .input-area {
259
- flex-direction: row;
260
- align-items: center;
261
- }
262
-
263
- .file-upload {
264
- width: 35px;
265
- height: 35px;
266
- }
267
- }
268
-
269
- /* Israeli style additions */
270
- .ai-message {
271
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
272
- font-weight: bold;
273
- }
274
-
275
- .bold-text {
276
- font-weight: bold;
277
- }
278
-
279
- .punctuation {
280
- color: var(--accent-color);
281
- font-weight: bold;
282
- }
283
-
284
- .israeli-slang {
285
- color: var(--primary-color);
286
- font-style: italic;
287
- }
288
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  </head>
290
- <body>
291
- <div class="header">
292
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
293
- <h1>צ'אט בינה מלאכותית ב בסגנון צברי! 🤖💬</h1>
294
- <p>ששאל כל שאלה ו וקבל תשובה ב בסגנון ישראלי נוועז!</p>
295
- </div>
296
 
297
- <div class="container">
298
- <div class="chat-container">
299
- <div class="chat-messages" id="chat-messages">
300
- <div class="ai-message">
301
- <span class="bold-text"יי חבר! 👋</span> <span class="punctuation">!</span><br>
302
- אני הבוט הצברי ש��ך, מו מוכן לע לעזור עם כל מה שא שאתה צריך <span class="israeli-slang">(גם אם זה קצת משוגע...)</span>.<br>
303
- <span class="punctuation">??</span> <span class="bold-text">מה הבררנז'ה</span>
304
- </div>
305
- </div>
306
-
307
- <div class="typing-indicator" id="typing-indicator">
308
- <div class="typing-dot"></div>
309
- <div class="typing-dot"></div>
310
- <div class="typing-dot"></div>
311
- </div>
312
-
313
- <div class="input-area">
314
- <div class="file-upload" title="העלאת קובובץ או תמונה">
315
- <i class="fas fa-paperclip"></i>
316
- <input type="file" id="file-input" accept=".txt,.pdf,.doc,.docx,.jpg,.jpeg,.png,.gif">
317
- </div>
318
- <input type="text" id="user-input" placeholder="כתוב כאן את ההודעה של שלך..." autocomplete="off">
319
- <button id="send-button"><i class="fas fa-paper-plane"></i> של שלח</button>
320
- </div>
 
 
 
 
321
  </div>
 
 
 
 
322
  </div>
 
323
 
324
- <script>
325
- document.addEventListener('DOMContentLoaded', function() {
326
  const chatMessages = document.getElementById('chat-messages');
327
  const userInput = document.getElementById('user-input');
328
  const sendButton = document.getElementById('send-button');
329
  const fileInput = document.getElementById('file-input');
330
  const typingIndicator = document.getElementById('typing-indicator');
 
331
 
332
  // Sample Israeli-style responses
333
  const israeliResponses = [
334
- "וואי אחי, איזה שאלה! 😎 ה הנה הת התשובה שלי:",
335
- "תשמע, זה לא פ פשוט אבל א אנסה להסביר:",
336
  "יאללה בוא נ נדבר על זה...",
337
- "חחח, איזה כיף ש ששאלת! אז כ ככה:",
338
- "וואו, שאלה מטורפת! ה הנה מה שאני חושב:",
339
- "תראה, אני א אגיד לך את הא האמת...",
340
- "בום! ה הנה הת התשובה של שלך:",
341
  "נו טוב, בוא נ נטפל ב בזה...",
342
- "סבבה, אני על זה! ה הנה מה שמ שמצאתי:",
343
- "אוקיי, בוא ניגש לע לעניין..."
344
  ];
345
 
346
  // Sample Israeli slang words to sprinkle in responses
347
  const israeliSlang = [
348
  "אאחי", "סבבה", "יאללה", "חחח", "וואי", "נו", "תראה", "ברנז'ה",
349
- "ממטורף", "כיף", "פצצה", "אש", "סתם", "חמוד", "מגניב", "פאדיחה"
350
  ];
351
 
352
  // Function to add punctuation for Israeli style
@@ -391,7 +443,7 @@
391
  let response = israeliResponses[Math.floor(Math.random() * israeliResponses.length)];
392
 
393
  if (fileContent) {
394
- response += `<br><span class="punctuation">!!</span> ראיתי את הקובובץ שה שהעלת <span class="israeli-slang">(ממגניב)</span>`;
395
  }
396
 
397
  // Generate some "intelligent" response based on user input
@@ -400,40 +452,40 @@
400
  response += `<br>לגבי "${inputWords.slice(0, 3).join(' ')}...", אני חושב ש`;
401
 
402
  const opinions = [
403
- "זה מ ממש מע מעניין!",
404
- "צריך לחשוב על זה יותר לעומומק.",
405
  "יש לי כמה ר רעיונות לגבי זה.",
406
- "זה נושא חשוב ש שצריך ל לבדוק.",
407
- "אני מס מסכים איתך לגמרי!",
408
- "יש לי נקודת מב מבט קצת שונה...",
409
  "זה משהו שכולם צריכים לדעת.",
410
- "אאני לא בטוח שאני מסכים עם זה.",
411
- "וואו, מעולם לא חשבתי על זה כ ככה!",
412
- "זה נושא ש שדורש עוד מחקר."
413
  ];
414
 
415
  response += opinions[Math.floor(Math.random() * opinions.length)];
416
  } else {
417
  response += "<br>" + [
418
- "אייזה כיף שא שאתה פה!",
419
  "מה עוד מע מעניין אותך לדעת?",
420
  "יש ל לך עוד שאלות בש בשבילי?",
421
  "אאני פה לכל מה שא שאתה צריך!",
422
- "ממשהו נוס נוסף שברצונונך ל לשאול?",
423
- "אאני אוהב את הש השאלות שלך!",
424
- "בוא נ נמשיך את השיחה המ המעניינת הזו!",
425
  "יש לי כל כך הרבה מה להגיד על זה!",
426
  "אתה מעלה נקודות מע מעניינות!",
427
- "בוא נדבר עוד על הנושא הזה!"
428
  ][Math.floor(Math.random() * 10)];
429
  }
430
 
431
  // Add some random facts
432
  if (Math.random() < 0.4) {
433
  const facts = [
434
- "<br><br>דרך א אגב, ידעת ש-90% מהישראלים אוהבים חומווס?",
435
- "<br><br>אאגב, מ מחקר חדש מר מראה ש...",
436
- "<br><br>קצת טריוויה: התל אביבי המ הממוצע שותה 3 ק קפה ביום!",
437
  "<br><br>חשבת פעם על זה ש...",
438
  "<br><br>משהו מע מעניין: רוב הא האנשים לא יודעים ש..."
439
  ];
@@ -460,13 +512,13 @@
460
  if (content.type.startsWith('image/')) {
461
  const reader = new FileReader();
462
  reader.onload = function(e) {
463
- messageDiv.innerHTML = `<div>${isUser ? 'אתה העלית ת תמונה:' : 'הנה הת התמונה של שלך:'}</div>
464
  <img src="${e.target.result}" class="uploaded-image" alt="Uploaded image">`;
465
  };
466
  reader.readAsDataURL(content);
467
  } else {
468
  messageDiv.innerHTML = `<div class="uploaded-file">
469
- <i class="fas fa-file-alt"></i> ${isUser ? 'העלית קובובץ:' : 'הנה הקובץ שלך:'} ${content.name}
470
  </div>`;
471
  }
472
  }
@@ -523,6 +575,8 @@
523
  if (message) {
524
  addMessage(message, true);
525
  userInput.value = '';
 
 
526
 
527
  simulateTyping(() => {
528
  addMessage(generateAIResponse(message));
@@ -530,6 +584,31 @@
530
  }
531
  }
532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
  // Initial demo messages
534
  setTimeout(() => {
535
  simulateTyping(() => {
@@ -537,6 +616,7 @@
537
  });
538
  }, 1500);
539
  });
540
- </script>
541
  </body>
 
542
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="he" dir="rtl">
3
+
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>צ'אאאט בינה מל מלאכותית - ס סגנון צברי</title>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ :root {
11
+ --primary-color: #0056b3;
12
+ --secondary-color: #ffd700;
13
+ --accent-color: #d40000;
14
+ --bg-color: #f5f5f5;
15
+ --chat-bg: #ffffff;
16
+ --text-color: #333;
17
+ --user-bubble: #e3f2fd;
18
+ --ai-bubble: #f1f1f1;
19
+ }
20
+
21
+ * {
22
+ margin: 0;
23
+ padding: 0;
24
+ box-sizing: border-box;
25
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
26
+ }
27
+
28
+ body {
29
+ background-color: var(--bg-color);
30
+ color: var(--text-color);
31
+ direction: rtl;
32
+ }
33
+
34
+ .header {
35
+ background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
36
+ color: white;
37
+ padding: 1rem;
38
+ text-align: center;
39
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
40
+ position: relative;
41
+ }
42
+
43
+ .header h1 {
44
+ font-size: 1.8rem;
45
+ margin-bottom: 0.5rem;
46
+ font-weight: bold;
47
+ }
48
+
49
+ .header p {
50
+ font-size: 0.9rem;
51
+ opacity: 0.9;
52
+ }
53
+
54
+ .header a {
55
+ position: absolute;
56
+ left: 1rem;
57
+ top: 50%;
58
+ transform: translateY(-50%);
59
+ color: white;
60
+ text-decoration: none;
61
+ font-size: 0.8rem;
62
+ }
63
+
64
+ .container {
65
+ max-width: 1000px;
66
+ margin: 0 auto;
67
+ padding: 1rem;
68
+ }
69
+
70
+ .chat-container {
71
+ background-color: var(--chat-bg);
72
+ border-radius: 10px;
73
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
74
+ overflow: hidden;
75
+ height: 70vh;
76
+ display: flex;
77
+ flex-direction: column;
78
+ }
79
+
80
+ .chat-messages {
81
+ flex: 1;
82
+ padding: 1rem;
83
+ overflow-y: auto;
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: 1rem;
87
+ }
88
+
89
+ .message {
90
+ max-width: 80%;
91
+ padding: 0.8rem 1rem;
92
+ border-radius: 15px;
93
+ line-height: 1.4;
94
+ position: relative;
95
+ animation: fadeIn 0.3s ease;
96
+ }
97
+
98
+ @keyframes fadeIn {
99
+ from {
100
+ opacity: 0;
101
+ transform: translateY(10px);
102
+ }
103
+
104
+ to {
105
+ opacity: 1;
106
+ transform: translateY(0);
107
+ }
108
+ }
109
+
110
+ .user-message {
111
+ align-self: flex-end;
112
+ background-color: var(--user-bubble);
113
+ border-bottom-right-radius: 5px;
114
+ color: #000;
115
+ font-weight: 500;
116
+ }
117
+
118
+ .ai-message {
119
+ align-self: flex-start;
120
+ background-color: var(--ai-bubble);
121
+ border-bottom-left-radius: 5px;
122
+ color: #000;
123
+ font-weight: bold;
124
+ }
125
+
126
+ .ai-message::before {
127
+ content: "🤖";
128
+ margin-left: 5px;
129
+ }
130
+
131
+ .user-message::before {
132
+ content: "👤";
133
+ margin-right: 5px;
134
+ }
135
+
136
+ .input-area {
137
+ display: flex;
138
+ padding: 1rem;
139
+ background-color: #fff;
140
+ border-top: 1px solid #eee;
141
+ gap: 0.5rem;
142
+ position: relative;
143
+ }
144
+
145
+ .input-area input {
146
+ flex: 1;
147
+ padding: 0.8rem 1rem;
148
+ border: 1px solid #ddd;
149
+ border-radius: 25px;
150
+ font-size: 1rem;
151
+ outline: none;
152
+ transition: border 0.3s;
153
+ }
154
+
155
+ .input-area input:focus {
156
+ border-color: var(--primary-color);
157
+ }
158
+
159
+ .input-area button {
160
+ background-color: var(--primary-color);
161
+ color: white;
162
+ border: none;
163
+ border-radius: 25px;
164
+ padding: 0 1.5rem;
165
+ cursor: pointer;
166
+ font-weight: bold;
167
+ transition: background 0.3s;
168
+ }
169
+
170
+ .input-area button:hover {
171
+ background-color: #003d82;
172
+ }
173
+
174
+ .file-upload {
175
+ position: relative;
176
+ width: 40px;
177
+ height: 40px;
178
+ display: flex;
179
+ align-items: center;
180
+ justify-content: center;
181
+ border-radius: 50%;
182
+ background-color: var(--secondary-color);
183
+ color: #333;
184
+ cursor: pointer;
185
+ }
186
+
187
+ .file-upload input {
188
+ position: absolute;
189
+ width: 100%;
190
+ height: 100%;
191
+ opacity: 0;
192
+ cursor: pointer;
193
+ }
194
+
195
+ .typing-indicator {
196
+ display: flex;
197
+ align-items: center;
198
+ gap: 5px;
199
+ padding: 0.5rem 1rem;
200
+ background-color: var(--ai-bubble);
201
+ border-radius: 15px;
202
+ align-self: flex-start;
203
+ margin-bottom: 0.5rem;
204
+ display: none;
205
+ }
206
+
207
+ .typing-dot {
208
+ width: 8px;
209
+ height: 8px;
210
+ background-color: #666;
211
+ border-radius: 50%;
212
+ animation: typingAnimation 1.4s infinite ease-in-out;
213
+ }
214
+
215
+ .typing-dot:nth-child(1) {
216
+ animation-delay: 0s;
217
+ }
218
+
219
+ .typing-dot:nth-child(2) {
220
+ animation-delay: 0.2s;
221
+ }
222
+
223
+ .typing-dot:nth-child(3) {
224
+ animation-delay: 0.4s;
225
+ }
226
+
227
+ @keyframes typingAnimation {
228
+
229
+ 0%,
230
+ 60%,
231
+ 100% {
232
+ transform: translateY(0);
233
+ }
234
+
235
+ 30% {
236
+ transform: translateY(-5px);
237
+ }
238
+ }
239
+
240
+ .uploaded-file {
241
+ display: inline-block;
242
+ margin-top: 0.5rem;
243
+ padding: 0.5rem;
244
+ background-color: rgba(0, 0, 0, 0.05);
245
+ border-radius: 5px;
246
+ font-size: 0.8rem;
247
+ }
248
+
249
+ .uploaded-file i {
250
+ margin-left: 5px;
251
+ }
252
+
253
+ .uploaded-image {
254
+ max-width: 200px;
255
+ max-height: 200px;
256
+ border-radius: 10px;
257
+ margin-top: 0.5rem;
258
+ cursor: pointer;
259
+ transition: transform 0.2s;
260
+ }
261
+
262
+ .uploaded-image:hover {
263
+ transform: scale(1.05);
264
+ }
265
+
266
+ /* Preview message styling */
267
+ .preview-message {
268
+ position: absolute;
269
+ bottom: 100%;
270
+ right: 1rem;
271
+ background-color: var(--user-bubble);
272
+ padding: 0.8rem 1rem;
273
+ border-radius: 15px;
274
+ border-bottom-right-radius: 5px;
275
+ max-width: 80%;
276
+ opacity: 0;
277
+ transform: translateY(20px);
278
+ transition: all 0.3s ease;
279
+ pointer-events: none;
280
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
281
+ }
282
+
283
+ .preview-message.visible {
284
+ opacity: 0.8;
285
+ transform: translateY(0);
286
+ }
287
+
288
+ .preview-message::before {
289
+ content: "👤";
290
+ margin-right: 5px;
291
+ }
292
+
293
+ @media (max-width: 768px) {
294
+ .chat-container {
295
+ height: 80vh;
296
+ }
297
+
298
+ .message {
299
+ max-width: 90%;
300
+ }
301
+
302
+ .input-area {
303
+ flex-direction: row;
304
+ align-items: center;
305
+ }
306
+
307
+ .file-upload {
308
+ width: 35px;
309
+ height: 35px;
310
+ }
311
+
312
+ .preview-message {
313
+ max-width: 70%;
314
+ }
315
+ }
316
+
317
+ /* Israeli style additions */
318
+ .ai-message {
319
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
320
+ font-weight: bold;
321
+ }
322
+
323
+ .bold-text {
324
+ font-weight: bold;
325
+ }
326
+
327
+ .punctuation {
328
+ color: var(--accent-color);
329
+ font-weight: bold;
330
+ }
331
+
332
+ .israeli-slang {
333
+ color: var(--primary-color);
334
+ font-style: italic;
335
+ }
336
+ </style>
337
  </head>
 
 
 
 
 
 
338
 
339
+ <body>
340
+ <div class="header">
341
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
342
+ <h1>צ'אט בינה מלאכותית ב ב בסגנון צברי! 🤖💬</h1>
343
+ <p>שששאל כל שאלה ו וקבל ת תשובה ב ב בסגנון ישראלי נוועז!</p>
344
+ </div>
345
+
346
+ <div class="container">
347
+ <div class="chat-container">
348
+ <div class="chat-messages" id="chat-messages">
349
+ <div class="ai-message">
350
+ <span class="bold-text">היי חבר! 👋</span> <span class="punctuation">!</span><br>
351
+ אני הבוט הצברי של שלך, מו מוכן לע לע לעזור עם כל מה שא שא שאתה צריך
352
+ <span class="israeli-slang">(גם אם זה קצת משוגע...)</span>.<br>
353
+ <span class="punctuation">??</span> <span class="bold-text">מה הבררנז'ה</span>
354
+ </div>
355
+ </div>
356
+
357
+ <div class="typing-indicator" id="typing-indicator">
358
+ <div class="typing-dot"></div>
359
+ <div class="typing-dot"></div>
360
+ <div class="typing-dot"></div>
361
+ </div>
362
+
363
+ <div class="input-area">
364
+ <div class="file-upload" title="ההעללאת קובובובץ או תמונה">
365
+ <i class="fas fa-paperclip"></i>
366
+ <input type="file" id="file-input" accept=".txt,.pdf,.doc,.docx,.jpg,.jpeg,.png,.gif">
367
  </div>
368
+ <input type="text" id="user-input" placeholder="כתוב כאן את ההודעה של של שלך..." autocomplete="off">
369
+ <button id="send-button"><i class="fas fa-paper-plane"></i> של של שלח</button>
370
+ <div class="preview-message" id="preview-message"></div>
371
+ </div>
372
  </div>
373
+ </div>
374
 
375
+ <script>
376
+ document.addEventListener('DOMContentLoaded', function() {
377
  const chatMessages = document.getElementById('chat-messages');
378
  const userInput = document.getElementById('user-input');
379
  const sendButton = document.getElementById('send-button');
380
  const fileInput = document.getElementById('file-input');
381
  const typingIndicator = document.getElementById('typing-indicator');
382
+ const previewMessage = document.getElementById('preview-message');
383
 
384
  // Sample Israeli-style responses
385
  const israeliResponses = [
386
+ "וואי אחי, איזה שאלה! 😎 ה ה הנה הת התשובה שלי:",
387
+ "תשמע, זה לא פ פשוט אבל א א אנסה להסביר:",
388
  "יאללה בוא נ נדבר על זה...",
389
+ "חחח, אייזה כיף ש ששאלת! אז כ ככה:",
390
+ "וואו, שאלה מטורפת! ה הנה מה שא שאני חושב:",
391
+ "תראה, אני א א אגיד לך את הא האמת...",
392
+ "בום! ה הנה הת הת התשובה של של שלך:",
393
  "נו טוב, בוא נ נטפל ב בזה...",
394
+ "סבבה, אני על זה! ה ה הנה מה שמ שמצאתי:",
395
+ "אוקיי, בוא ניגש לע לע לעניין..."
396
  ];
397
 
398
  // Sample Israeli slang words to sprinkle in responses
399
  const israeliSlang = [
400
  "אאחי", "סבבה", "יאללה", "חחח", "וואי", "נו", "תראה", "ברנז'ה",
401
+ "מממטורף", "כיף", "פצצה", "אאש", "סתם", "חמוד", "ממגניב", "פאדיחה"
402
  ];
403
 
404
  // Function to add punctuation for Israeli style
 
443
  let response = israeliResponses[Math.floor(Math.random() * israeliResponses.length)];
444
 
445
  if (fileContent) {
446
+ response += `<br><span class="punctuation">!!</span> ראיתי את הקובובובץ שה שהעלת <span class="israeli-slang">(ממגניב)</span>`;
447
  }
448
 
449
  // Generate some "intelligent" response based on user input
 
452
  response += `<br>לגבי "${inputWords.slice(0, 3).join(' ')}...", אני חושב ש`;
453
 
454
  const opinions = [
455
+ "זה מ מ ממש מע מעניין!",
456
+ "צריך לחשוב על זה יותר לעוומומק.",
457
  "יש לי כמה ר רעיונות לגבי זה.",
458
+ "זה נושא חשוב ש ש שצריך ל ל לבדוק.",
459
+ אני מס מסכים איתיתך לגמרי!",
460
+ "יש לי נקודת מב מב מבט קצת שונה...",
461
  "זה משהו שכולם צריכים לדעת.",
462
+ "אאאני לא בטוח שא שאני מס מסכים עם זה.",
463
+ "וואו, מעולם לא ח חשבתי על זה כ ככה!",
464
+ "זה נושא ש ש שדורש עוד מחקר."
465
  ];
466
 
467
  response += opinions[Math.floor(Math.random() * opinions.length)];
468
  } else {
469
  response += "<br>" + [
470
+ "אייייזה כיף שא שאתה פה!",
471
  "מה עוד מע מעניין אותך לדעת?",
472
  "יש ל לך עוד שאלות בש בשבילי?",
473
  "אאני פה לכל מה שא שאתה צריך!",
474
+ "ממשהו נוס נוסף שברצונונונך ל לשאול?",
475
+ "אאאני אוהוהב את הש הש השאלות שלך!",
476
+ "בוא נ נ נמשיך את השיחה המ המעניינת הזו!",
477
  "יש לי כל כך הרבה מה להגיד על זה!",
478
  "אתה מעלה נקודות מע מעניינות!",
479
+ "בוא נ נדבר עוד על הנושא הזה!"
480
  ][Math.floor(Math.random() * 10)];
481
  }
482
 
483
  // Add some random facts
484
  if (Math.random() < 0.4) {
485
  const facts = [
486
+ "<br><br>דרך א א אגב, ידעת ש-90% מהישראלים אוהבים חומווס?",
487
+ "<br><br>אאאגב, מ מ מחקר חדש מר מראה ש...",
488
+ "<br><br>קצת טריוויה: התל אביבי המ הממווצע שותה 3 ק ק קפה ביום!",
489
  "<br><br>חשבת פעם על זה ש...",
490
  "<br><br>משהו מע מעניין: רוב הא האנשים לא יודעים ש..."
491
  ];
 
512
  if (content.type.startsWith('image/')) {
513
  const reader = new FileReader();
514
  reader.onload = function(e) {
515
+ messageDiv.innerHTML = `<div>${isUser ? 'אתה העלית ת תמונה:' : 'ההנה הת התמונה של של שלך:'}</div>
516
  <img src="${e.target.result}" class="uploaded-image" alt="Uploaded image">`;
517
  };
518
  reader.readAsDataURL(content);
519
  } else {
520
  messageDiv.innerHTML = `<div class="uploaded-file">
521
+ <i class="fas fa-file-alt"></i> ${isUser ? 'ההעלית קובובץ:' : 'ההנה הקובץ שלך:'} ${content.name}
522
  </div>`;
523
  }
524
  }
 
575
  if (message) {
576
  addMessage(message, true);
577
  userInput.value = '';
578
+ previewMessage.textContent = '';
579
+ previewMessage.classList.remove('visible');
580
 
581
  simulateTyping(() => {
582
  addMessage(generateAIResponse(message));
 
584
  }
585
  }
586
 
587
+ // Show preview of message while typing
588
+ userInput.addEventListener('input', function() {
589
+ if (userInput.value.trim()) {
590
+ previewMessage.textContent = userInput.value;
591
+ previewMessage.classList.add('visible');
592
+ } else {
593
+ previewMessage.classList.remove('visible');
594
+ }
595
+ });
596
+
597
+ // Hide preview when input loses focus
598
+ userInput.addEventListener('blur', function() {
599
+ setTimeout(() => {
600
+ previewMessage.classList.remove('visible');
601
+ }, 200);
602
+ });
603
+
604
+ // Show preview when input gains focus (if there's text)
605
+ userInput.addEventListener('focus', function() {
606
+ if (userInput.value.trim()) {
607
+ previewMessage.textContent = userInput.value;
608
+ previewMessage.classList.add('visible');
609
+ }
610
+ });
611
+
612
  // Initial demo messages
613
  setTimeout(() => {
614
  simulateTyping(() => {
 
616
  });
617
  }, 1500);
618
  });
619
+ </script>
620
  </body>
621
+
622
  </html>