undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +411 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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: tech-sales-assistant
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: pink
|
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,411 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>Liquid Glass AI Assistant</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 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
11 |
+
|
12 |
+
body {
|
13 |
+
font-family: 'Poppins', sans-serif;
|
14 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
15 |
+
min-height: 100vh;
|
16 |
+
margin: 0;
|
17 |
+
padding: 0;
|
18 |
+
}
|
19 |
+
|
20 |
+
.glass-effect {
|
21 |
+
background: rgba(255, 255, 255, 0.25);
|
22 |
+
backdrop-filter: blur(10px);
|
23 |
+
-webkit-backdrop-filter: blur(10px);
|
24 |
+
border-radius: 20px;
|
25 |
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
26 |
+
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
|
27 |
+
}
|
28 |
+
|
29 |
+
.message-bubble {
|
30 |
+
max-width: 80%;
|
31 |
+
padding: 12px 16px;
|
32 |
+
margin-bottom: 8px;
|
33 |
+
border-radius: 18px;
|
34 |
+
position: relative;
|
35 |
+
animation: fadeIn 0.3s ease-out;
|
36 |
+
}
|
37 |
+
|
38 |
+
.user-bubble {
|
39 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
40 |
+
color: white;
|
41 |
+
align-self: flex-end;
|
42 |
+
border-bottom-right-radius: 4px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.ai-bubble {
|
46 |
+
background: rgba(255, 255, 255, 0.9);
|
47 |
+
color: #333;
|
48 |
+
align-self: flex-start;
|
49 |
+
border-bottom-left-radius: 4px;
|
50 |
+
}
|
51 |
+
|
52 |
+
.typing-indicator {
|
53 |
+
display: flex;
|
54 |
+
padding: 12px 16px;
|
55 |
+
background: rgba(255, 255, 255, 0.9);
|
56 |
+
border-radius: 18px;
|
57 |
+
width: fit-content;
|
58 |
+
margin-bottom: 8px;
|
59 |
+
}
|
60 |
+
|
61 |
+
.typing-dot {
|
62 |
+
width: 8px;
|
63 |
+
height: 8px;
|
64 |
+
background-color: #667eea;
|
65 |
+
border-radius: 50%;
|
66 |
+
margin: 0 2px;
|
67 |
+
animation: typingAnimation 1.4s infinite ease-in-out;
|
68 |
+
}
|
69 |
+
|
70 |
+
.typing-dot:nth-child(1) { animation-delay: 0s; }
|
71 |
+
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
|
72 |
+
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
|
73 |
+
|
74 |
+
@keyframes typingAnimation {
|
75 |
+
0%, 60%, 100% { transform: translateY(0); }
|
76 |
+
30% { transform: translateY(-5px); }
|
77 |
+
}
|
78 |
+
|
79 |
+
@keyframes fadeIn {
|
80 |
+
from { opacity: 0; transform: translateY(10px); }
|
81 |
+
to { opacity: 1; transform: translateY(0); }
|
82 |
+
}
|
83 |
+
|
84 |
+
.gallery {
|
85 |
+
display: grid;
|
86 |
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
87 |
+
gap: 10px;
|
88 |
+
margin-top: 10px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.gallery img {
|
92 |
+
width: 100%;
|
93 |
+
height: 120px;
|
94 |
+
object-fit: cover;
|
95 |
+
border-radius: 8px;
|
96 |
+
cursor: pointer;
|
97 |
+
transition: transform 0.3s;
|
98 |
+
}
|
99 |
+
|
100 |
+
.gallery img:hover {
|
101 |
+
transform: scale(1.05);
|
102 |
+
}
|
103 |
+
|
104 |
+
.modal {
|
105 |
+
position: fixed;
|
106 |
+
top: 0;
|
107 |
+
left: 0;
|
108 |
+
width: 100%;
|
109 |
+
height: 100%;
|
110 |
+
background: rgba(0, 0, 0, 0.8);
|
111 |
+
display: flex;
|
112 |
+
justify-content: center;
|
113 |
+
align-items: center;
|
114 |
+
z-index: 1000;
|
115 |
+
opacity: 0;
|
116 |
+
pointer-events: none;
|
117 |
+
transition: opacity 0.3s;
|
118 |
+
}
|
119 |
+
|
120 |
+
.modal.active {
|
121 |
+
opacity: 1;
|
122 |
+
pointer-events: all;
|
123 |
+
}
|
124 |
+
|
125 |
+
.modal-content {
|
126 |
+
max-width: 90%;
|
127 |
+
max-height: 90%;
|
128 |
+
}
|
129 |
+
|
130 |
+
.modal-content img {
|
131 |
+
max-width: 100%;
|
132 |
+
max-height: 90vh;
|
133 |
+
border-radius: 10px;
|
134 |
+
}
|
135 |
+
|
136 |
+
.close-modal {
|
137 |
+
position: absolute;
|
138 |
+
top: 20px;
|
139 |
+
right: 20px;
|
140 |
+
color: white;
|
141 |
+
font-size: 24px;
|
142 |
+
cursor: pointer;
|
143 |
+
}
|
144 |
+
|
145 |
+
.specs-table {
|
146 |
+
width: 100%;
|
147 |
+
border-collapse: collapse;
|
148 |
+
margin-top: 10px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.specs-table tr:nth-child(even) {
|
152 |
+
background-color: rgba(0, 0, 0, 0.05);
|
153 |
+
}
|
154 |
+
|
155 |
+
.specs-table td {
|
156 |
+
padding: 8px 12px;
|
157 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
158 |
+
}
|
159 |
+
|
160 |
+
.specs-table td:first-child {
|
161 |
+
font-weight: 500;
|
162 |
+
}
|
163 |
+
</style>
|
164 |
+
</head>
|
165 |
+
<body class="flex items-center justify-center p-4 md:p-8">
|
166 |
+
<div class="w-full max-w-3xl h-[90vh] flex flex-col glass-effect overflow-hidden">
|
167 |
+
<!-- Header -->
|
168 |
+
<div class="p-4 border-b border-white/20 flex items-center">
|
169 |
+
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 flex items-center justify-center text-white font-bold">AI</div>
|
170 |
+
<div class="ml-3">
|
171 |
+
<h2 class="font-semibold text-lg">Tech Sales Assistant</h2>
|
172 |
+
<p class="text-xs text-gray-600">Online</p>
|
173 |
+
</div>
|
174 |
+
<div class="ml-auto flex space-x-2">
|
175 |
+
<button class="w-8 h-8 rounded-full bg-white/20 flex items-center justify-center text-gray-700 hover:bg-white/30 transition">
|
176 |
+
<i class="fas fa-phone-alt text-sm"></i>
|
177 |
+
</button>
|
178 |
+
<button class="w-8 h-8 rounded-full bg-white/20 flex items-center justify-center text-gray-700 hover:bg-white/30 transition">
|
179 |
+
<i class="fas fa-ellipsis-v text-sm"></i>
|
180 |
+
</button>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
|
184 |
+
<!-- Chat messages container -->
|
185 |
+
<div id="chat-container" class="flex-1 p-4 overflow-y-auto space-y-2">
|
186 |
+
<!-- Initial greeting -->
|
187 |
+
<div class="message-bubble ai-bubble">
|
188 |
+
<p>Hello! I'm your technical sales assistant. How can I help you today? I can recommend products, compare specifications, or answer technical questions.</p>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<!-- User message 1 -->
|
192 |
+
<div class="message-bubble user-bubble">
|
193 |
+
<p>Hi! I'm looking for a high-performance laptop for video editing and 3D rendering. What would you recommend?</p>
|
194 |
+
</div>
|
195 |
+
|
196 |
+
<!-- AI typing indicator -->
|
197 |
+
<div id="typing-indicator" class="typing-indicator hidden">
|
198 |
+
<div class="typing-dot"></div>
|
199 |
+
<div class="typing-dot"></div>
|
200 |
+
<div class="typing-dot"></div>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
|
204 |
+
<!-- Input area -->
|
205 |
+
<div class="p-4 border-t border-white/20">
|
206 |
+
<div class="flex items-center">
|
207 |
+
<input id="user-input" type="text" placeholder="Type your message..." class="flex-1 bg-white/30 rounded-full py-3 px-4 focus:outline-none focus:ring-2 focus:ring-purple-300 text-sm">
|
208 |
+
<button id="send-btn" class="ml-2 w-12 h-12 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 text-white flex items-center justify-center hover:from-purple-600 hover:to-blue-600 transition">
|
209 |
+
<i class="fas fa-paper-plane"></i>
|
210 |
+
</button>
|
211 |
+
</div>
|
212 |
+
<p class="text-xs text-center text-gray-500 mt-2">AI Assistant may produce inaccurate information</p>
|
213 |
+
</div>
|
214 |
+
</div>
|
215 |
+
|
216 |
+
<!-- Replay Button -->
|
217 |
+
<button id="replay-btn" class="fixed bottom-6 right-6 w-14 h-14 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 text-white flex items-center justify-center shadow-lg hover:from-purple-600 hover:to-blue-600 transition z-50">
|
218 |
+
<i class="fas fa-redo"></i>
|
219 |
+
</button>
|
220 |
+
|
221 |
+
<!-- Image modal -->
|
222 |
+
<div id="image-modal" class="modal">
|
223 |
+
<span class="close-modal"><i class="fas fa-times"></i></span>
|
224 |
+
<div class="modal-content">
|
225 |
+
<img id="modal-image" src="" alt="Enlarged view">
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<script>
|
230 |
+
// Conversation flow
|
231 |
+
const conversation = [
|
232 |
+
{
|
233 |
+
user: "Hi! I'm looking for a high-performance laptop for video editing and 3D rendering. What would you recommend?",
|
234 |
+
ai: "For professional video editing and 3D rendering, I'd recommend our <strong>ProStudio X9000</strong>. It features an Intel Core i9-13900HX processor, NVIDIA RTX 4090 GPU, 64GB DDR5 RAM, and a 2TB NVMe SSD. The 17.3\" 4K 120Hz display covers 100% Adobe RGB for accurate color work. Would you like more details or comparisons?"
|
235 |
+
},
|
236 |
+
{
|
237 |
+
user: "That sounds powerful but expensive. Do you have something more budget-friendly?",
|
238 |
+
ai: "Certainly! The <strong>CreatorPro V700</strong> offers excellent value at a lower price point. It has an Intel Core i7-13700H, RTX 4070 GPU, 32GB RAM, and 1TB SSD. The 15.6\" 4K display covers 95% DCI-P3. While not as fast as the X9000, it handles 4K editing smoothly and can manage moderate 3D workloads."
|
239 |
+
},
|
240 |
+
{
|
241 |
+
user: "Can you compare the X9000 and V700 specs side by side?",
|
242 |
+
ai: `Here's a detailed comparison:<br><br>
|
243 |
+
<table class="specs-table">
|
244 |
+
<tr><td></td><td class="font-semibold">ProStudio X9000</td><td class="font-semibold">CreatorPro V700</td></tr>
|
245 |
+
<tr><td>Processor</td><td>i9-13900HX (24 cores)</td><td>i7-13700H (14 cores)</td></tr>
|
246 |
+
<tr><td>GPU</td><td>RTX 4090 (16GB)</td><td>RTX 4070 (8GB)</td></tr>
|
247 |
+
<tr><td>RAM</td><td>64GB DDR5</td><td>32GB DDR5</td></tr>
|
248 |
+
<tr><td>Storage</td><td>2TB NVMe SSD</td><td>1TB NVMe SSD</td></tr>
|
249 |
+
<tr><td>Display</td><td>17.3" 4K 120Hz</td><td>15.6" 4K 60Hz</td></tr>
|
250 |
+
<tr><td>Color Gamut</td><td>100% Adobe RGB</td><td>95% DCI-P3</td></tr>
|
251 |
+
<tr><td>Battery</td><td>94Wh (≈6hrs)</td><td>80Wh (≈8hrs)</td></tr>
|
252 |
+
<tr><td>Weight</td><td>3.2kg</td><td>2.1kg</td></tr>
|
253 |
+
<tr><td>Price</td><td>$3,999</td><td>$2,299</td></tr>
|
254 |
+
</table>`
|
255 |
+
},
|
256 |
+
{
|
257 |
+
user: "Can you show me some pictures of the V700? I want to see the design.",
|
258 |
+
ai: `Here are some images of the CreatorPro V700:<br><br>
|
259 |
+
<div class="gallery">
|
260 |
+
<img src="https://images.unsplash.com/photo-1593642632823-8f785ba67e45?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="V700 Front View" class="gallery-img">
|
261 |
+
<img src="https://images.unsplash.com/photo-1593642634524-b40b5baae6bb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="V700 Keyboard" class="gallery-img">
|
262 |
+
<img src="https://images.unsplash.com/photo-1593642702749-b7d2a804fbcf?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="V700 Side View" class="gallery-img">
|
263 |
+
<img src="https://images.unsplash.com/photo-1593642702821-8f15c2a49cd4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="V700 Display" class="gallery-img">
|
264 |
+
</div>`
|
265 |
+
},
|
266 |
+
{
|
267 |
+
user: "What's the maximum RAM capacity for the V700? And does it support Thunderbolt 4?",
|
268 |
+
ai: `The CreatorPro V700 supports up to <strong>64GB of DDR5 RAM</strong> (2 slots, 32GB each). It does feature <strong>Thunderbolt 4</strong> via its USB-C port (left side), supporting:<br>
|
269 |
+
- 40Gbps data transfer<br>
|
270 |
+
- Dual 4K display output<br>
|
271 |
+
- 100W power delivery<br>
|
272 |
+
- PCIe tunneling for external GPUs<br><br>
|
273 |
+
The RAM is user-upgradeable, but opening the case voids the warranty unless done by authorized service centers.`
|
274 |
+
},
|
275 |
+
{
|
276 |
+
user: "How does the cooling system perform under sustained loads?",
|
277 |
+
ai: `The V700 uses a <strong>dual-fan vapor chamber cooling system</strong> with the following performance characteristics:<br><br>
|
278 |
+
- Under full CPU+GPU load (e.g., rendering): maintains ~85°C on CPU and 78°C on GPU<br>
|
279 |
+
- Fan noise reaches 45dB at maximum speed<br>
|
280 |
+
- Throttling begins at 95°C CPU/88°C GPU<br>
|
281 |
+
- Includes 3 performance modes via FN+Q:<br>
|
282 |
+
• Silent: 25dB max, reduced performance<br>
|
283 |
+
• Balanced: 35dB, optimal for most tasks<br>
|
284 |
+
• Performance: 45dB, full power<br><br>
|
285 |
+
For extended rendering sessions, we recommend using a cooling pad for best results.`
|
286 |
+
}
|
287 |
+
];
|
288 |
+
|
289 |
+
// DOM elements
|
290 |
+
const chatContainer = document.getElementById('chat-container');
|
291 |
+
const userInput = document.getElementById('user-input');
|
292 |
+
const sendBtn = document.getElementById('send-btn');
|
293 |
+
const typingIndicator = document.getElementById('typing-indicator');
|
294 |
+
const imageModal = document.getElementById('image-modal');
|
295 |
+
const modalImage = document.getElementById('modal-image');
|
296 |
+
const closeModal = document.querySelector('.close-modal');
|
297 |
+
|
298 |
+
let currentStep = 0;
|
299 |
+
|
300 |
+
// Initialize conversation
|
301 |
+
setTimeout(() => {
|
302 |
+
simulateAIResponse();
|
303 |
+
}, 1000);
|
304 |
+
|
305 |
+
// Send message handler
|
306 |
+
function sendMessage() {
|
307 |
+
const message = userInput.value.trim();
|
308 |
+
if (message === '') return;
|
309 |
+
|
310 |
+
// Add user message
|
311 |
+
addMessage(message, 'user');
|
312 |
+
userInput.value = '';
|
313 |
+
|
314 |
+
// Show typing indicator
|
315 |
+
typingIndicator.classList.remove('hidden');
|
316 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
317 |
+
|
318 |
+
// Simulate AI response after delay
|
319 |
+
setTimeout(() => {
|
320 |
+
typingIndicator.classList.add('hidden');
|
321 |
+
simulateAIResponse();
|
322 |
+
}, 1500);
|
323 |
+
}
|
324 |
+
|
325 |
+
// Add message to chat
|
326 |
+
function addMessage(message, sender) {
|
327 |
+
const messageDiv = document.createElement('div');
|
328 |
+
messageDiv.className = `message-bubble ${sender}-bubble`;
|
329 |
+
messageDiv.innerHTML = message;
|
330 |
+
chatContainer.appendChild(messageDiv);
|
331 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
332 |
+
|
333 |
+
// Handle gallery images
|
334 |
+
if (sender === 'ai') {
|
335 |
+
setTimeout(() => {
|
336 |
+
const galleryImages = document.querySelectorAll('.gallery-img');
|
337 |
+
galleryImages.forEach(img => {
|
338 |
+
img.addEventListener('click', () => {
|
339 |
+
modalImage.src = img.src;
|
340 |
+
imageModal.classList.add('active');
|
341 |
+
});
|
342 |
+
});
|
343 |
+
}, 100);
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
// Simulate AI response based on conversation flow
|
348 |
+
function simulateAIResponse() {
|
349 |
+
if (currentStep < conversation.length) {
|
350 |
+
addMessage(conversation[currentStep].ai, 'ai');
|
351 |
+
currentStep++;
|
352 |
+
} else {
|
353 |
+
addMessage("Is there anything else I can help you with today?", 'ai');
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
// Event listeners
|
358 |
+
sendBtn.addEventListener('click', sendMessage);
|
359 |
+
userInput.addEventListener('keypress', (e) => {
|
360 |
+
if (e.key === 'Enter') sendMessage();
|
361 |
+
});
|
362 |
+
|
363 |
+
closeModal.addEventListener('click', () => {
|
364 |
+
imageModal.classList.remove('active');
|
365 |
+
});
|
366 |
+
|
367 |
+
imageModal.addEventListener('click', (e) => {
|
368 |
+
if (e.target === imageModal) {
|
369 |
+
imageModal.classList.remove('active');
|
370 |
+
}
|
371 |
+
});
|
372 |
+
|
373 |
+
// Replay conversation handler
|
374 |
+
document.getElementById('replay-btn').addEventListener('click', () => {
|
375 |
+
// Clear chat
|
376 |
+
chatContainer.innerHTML = `
|
377 |
+
<div class="message-bubble ai-bubble">
|
378 |
+
<p>Hello! I'm your technical sales assistant. How can I help you today? I can recommend products, compare specifications, or answer technical questions.</p>
|
379 |
+
</div>
|
380 |
+
`;
|
381 |
+
|
382 |
+
// Reset to beginning
|
383 |
+
currentStep = 0;
|
384 |
+
|
385 |
+
// Animate through conversation with delays
|
386 |
+
let delay = 2000; // Initial delay
|
387 |
+
|
388 |
+
conversation.forEach((step, index) => {
|
389 |
+
// User message
|
390 |
+
setTimeout(() => {
|
391 |
+
addMessage(step.user, 'user');
|
392 |
+
}, delay);
|
393 |
+
|
394 |
+
// AI typing indicator
|
395 |
+
setTimeout(() => {
|
396 |
+
typingIndicator.classList.remove('hidden');
|
397 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
398 |
+
}, delay + 500);
|
399 |
+
|
400 |
+
// AI response
|
401 |
+
setTimeout(() => {
|
402 |
+
typingIndicator.classList.add('hidden');
|
403 |
+
addMessage(step.ai, 'ai');
|
404 |
+
}, delay + 2000);
|
405 |
+
|
406 |
+
delay += 3500; // Increment delay for next pair
|
407 |
+
});
|
408 |
+
});
|
409 |
+
</script>
|
410 |
+
<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=michalkichal/tech-sales-assistant" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
411 |
+
</html>
|