File size: 26,883 Bytes
cb363e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jay's Mobile Wash AI Call Center</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Custom styles that extend Tailwind */
:root {
--primary: #1e88e5;
--secondary: #43a047;
--background: #f5f5f5;
--text: #333333;
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body.dark {
--primary: #64b5f6;
--secondary: #81c784;
--background: #1a1a1a;
--text: #e0e0e0;
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
background-color: #121212;
color: #e0e0e0;
}
.message-user {
background-color: #e3f2fd;
margin-right: 20%;
}
.message-bot {
background-color: #f1f8e9;
margin-left: 20%;
}
.status-indicator {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 5px;
}
.status-healthy {
background-color: #4caf50;
}
.status-warning {
background-color: #ff9800;
}
.status-error {
background-color: #f44336;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
animation: fadeIn 0.3s ease-in-out;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
/* Smoother transitions */
* {
transition: background-color 0.2s ease, color 0.2s ease;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
body.dark ::-webkit-scrollbar-track {
background: #333;
}
body.dark ::-webkit-scrollbar-thumb {
background: #666;
}
body.dark ::-webkit-scrollbar-thumb:hover {
background: #888;
}
</style>
</head>
<body class="bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 min-h-screen">
<!-- Header -->
<header class="bg-blue-600 dark:bg-blue-900 text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div>
<h1 class="text-3xl md:text-4xl font-bold"><i class="fas fa-car mr-2"></i>Jay's Mobile Wash</h1>
<p class="mt-1 text-blue-100 dark:text-blue-200">AI Call Center - Daylight Reveals Perfection</p>
</div>
<div>
<button id="darkModeToggle" class="bg-gray-700 dark:bg-gray-300 text-white dark:text-gray-900 rounded-full w-10 h-10 flex items-center justify-center focus:outline-none hover:bg-gray-600 dark:hover:bg-gray-400">
<i class="fas fa-moon dark:hidden"></i>
<i class="fas fa-sun hidden dark:block"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Main Container -->
<div class="container mx-auto px-4 py-6">
<!-- Tab Navigation -->
<div class="flex overflow-x-auto mb-6 border-b border-gray-300 dark:border-gray-700">
<button onclick="openTab(event, 'chatTab')" class="tab-button px-4 py-3 font-medium border-b-2 border-transparent hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 whitespace-nowrap active">
<i class="fas fa-comments mr-2"></i>Chat
</button>
<button onclick="openTab(event, 'voiceTab')" class="tab-button px-4 py-3 font-medium border-b-2 border-transparent hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 whitespace-nowrap">
<i class="fas fa-microphone mr-2"></i>Voice
</button>
<button onclick="openTab(event, 'smsTab')" class="tab-button px-4 py-3 font-medium border-b-2 border-transparent hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 whitespace-nowrap">
<i class="fas fa-sms mr-2"></i>SMS Response
</button>
<button onclick="openTab(event, 'dashboardTab')" class="tab-button px-4 py-3 font-medium border-b-2 border-transparent hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 whitespace-nowrap">
<i class="fas fa-tachometer-alt mr-2"></i>Dashboard
</button>
<button onclick="openTab(event, 'setupTab')" class="tab-button px-4 py-3 font-medium border-b-2 border-transparent hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 whitespace-nowrap">
<i class="fas fa-cog mr-2"></i>Setup Wizard
</button>
</div>
<!-- Tab Content -->
<div class="space-y-6">
<!-- Chat Tab -->
<div id="chatTab" class="tab-content active">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<h2 class="text-2xl font-semibold mb-4 flex items-center">
<i class="fas fa-robot mr-2 text-green-500"></i>Chat Assistant
</h2>
<div id="chatHistory" class="h-96 overflow-y-auto mb-4 p-4 border border-gray-200 dark:border-gray-700 rounded-lg bg-gray-50 dark:bg-gray-700">
<!-- Messages will appear here dynamically -->
<div class="mb-4 p-3 rounded-lg">
<p class="text-gray-600 dark:text-gray-300 text-center">Welcome to Jay's Mobile Wash AI Call Center! How can I assist you today?</p>
</div>
</div>
<div class="flex">
<input type="text" id="chatInput" class="flex-1 p-3 border border-gray-300 dark:border-gray-600 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="Type your message here...">
<button onclick="sendMessage()" class="bg-blue-600 dark:bg-blue-700 hover:bg-blue-700 dark:hover:bg-blue-800 text-white px-6 rounded-r-lg font-medium">
<i class="fas fa-paper-plane mr-2"></i>Send
</button>
</div>
</div>
</div>
<!-- Voice Tab -->
<div id="voiceTab" class="tab-content">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<h2 class="text-2xl font-semibold mb-4 flex items-center">
<i class="fas fa-microphone-alt mr-2 text-purple-500"></i>Voice Generator
</h2>
<div class="mb-4">
<label class="block mb-2 font-medium">Enter text to generate voice:</label>
<textarea id="voiceTextInput" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg h-32 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="Type the text you want to hear..."></textarea>
</div>
<button onclick="generateVoice()" class="bg-purple-600 dark:bg-purple-700 hover:bg-purple-700 dark:hover:bg-purple-800 text-white px-6 py-3 rounded-lg font-medium">
<i class="fas fa-volume-up mr-2"></i>Generate Voice
</button>
<div class="mt-6 bg-gray-100 dark:bg-gray-700 p-4 rounded-lg">
<p id="voiceStatus" class="mb-2">Ready to generate audio.</p>
<audio id="audioPlayer" controls class="w-full"></audio>
</div>
</div>
</div>
<!-- SMS Response Tab -->
<div id="smsTab" class="tab-content">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4 flex items-center">
<i class="fas fa-inbox mr-2 text-orange-500"></i>Pending SMS Messages
</h2>
<div class="mb-4 flex justify-between items-center">
<p id="smsStatus" class="text-gray-600 dark:text-gray-300">Loading pending messages...</p>
<button onclick="loadPendingSMS()" class="bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-800 dark:text-gray-200 px-4 py-2 rounded-lg font-medium text-sm flex items-center">
<i class="fas fa-sync-alt mr-2"></i>Refresh
</button>
</div>
<div class="overflow-x-auto">
<table id="pendingSMSTable" class="min-w-full bg-white dark:bg-gray-800 rounded-lg overflow-hidden">
<thead class="bg-gray-100 dark:bg-gray-700">
<tr>
<th class="py-3 px-4 text-left text-sm font-medium text-gray-700 dark:text-gray-300">From</th>
<th class="py-3 px-4 text-left text-sm font-medium text-gray-700 dark:text-gray-300">Message</th>
<th class="py-3 px-4 text-left text-sm font-medium text-gray-700 dark:text-gray-300">Time</th>
<th class="py-3 px-4 text-left text-sm font-medium text-gray-700 dark:text-gray-300">Action</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
<!-- SMS messages will appear here dynamically -->
<tr>
<td colspan="4" class="py-4 px-4 text-center text-gray-500 dark:text-gray-400">No pending messages</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<h2 class="text-2xl font-semibold mb-4 flex items-center">
<i class="fas fa-reply mr-2 text-green-500"></i>Respond to Message
</h2>
<form onsubmit="event.preventDefault(); sendSMSResponse();">
<input type="hidden" id="smsId">
<div class="mb-4">
<label class="block mb-2 font-medium">To:</label>
<p id="smsTo" class="bg-gray-100 dark:bg-gray-700 p-3 rounded-lg">Select a message above</p>
</div>
<div class="mb-4">
<label class="block mb-2 font-medium">Response:</label>
<textarea id="smsText" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg h-32 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="Type your response here..."></textarea>
</div>
<button type="submit" class="bg-green-600 dark:bg-green-700 hover:bg-green-700 dark:hover:bg-green-800 text-white px-6 py-3 rounded-lg font-medium">
<i class="fas fa-paper-plane mr-2"></i>Send Response
</button>
</form>
<p id="smsResponseStatus" class="mt-4"></p>
</div>
</div>
<!-- Dashboard Tab -->
<div id="dashboardTab" class="tab-content">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<h2 class="text-2xl font-semibold mb-6 flex items-center">
<i class="fas fa-chart-line mr-2 text-blue-500"></i>System Dashboard
</h2>
<!-- System Status Card -->
<div class="mb-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-semibold">System Status</h3>
<button onclick="loadSystemHealth()" class="bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-800 dark:text-gray-200 px-4 py-2 rounded-lg font-medium text-sm flex items-center">
<i class="fas fa-sync-alt mr-2"></i>Refresh
</button>
</div>
<div class="bg-gray-100 dark:bg-gray-700 rounded-lg p-4">
<div class="flex items-center mb-4">
<span id="systemStatus" class="status-indicator status-warning"></span>
<span id="systemStatusText" class="ml-2 font-medium">Loading system status...</span>
</div>
<h4 class="font-medium mb-2">Components</h4>
<table id="componentsTable" class="w-full">
<tbody class="divide-y divide-gray-200 dark:divide-gray-600">
<tr>
<td colspan="2" class="py-2 text-center text-gray-500 dark:text-gray-400">Loading component status...</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Metrics -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="bg-blue-100 dark:bg-blue-900 rounded-lg p-6 shadow">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-200 dark:bg-blue-800 mr-4">
<i class="fas fa-sms text-blue-600 dark:text-blue-400 text-xl"></i>
</div>
<div>
<p class="text-sm text-gray-600 dark:text-gray-300">Pending SMS</p>
<p id="pendingSMSCount" class="text-2xl font-semibold">0</p>
</div>
</div>
</div>
<div class="bg-green-100 dark:bg-green-900 rounded-lg p-6 shadow">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-200 dark:bg-green-800 mr-4">
<i class="fas fa-phone-alt text-green-600 dark:text-green-400 text-xl"></i>
</div>
<div>
<p class="text-sm text-gray-600 dark:text-gray-300">Active Calls</p>
<p id="activeCallsCount" class="text-2xl font-semibold">0</p>
</div>
</div>
</div>
</div>
<!-- Recent Activity -->
<div>
<h3 class="text-xl font-semibold mb-4">Recent Activity</h3>
<div class="bg-gray-100 dark:bg-gray-700 rounded-lg p-4">
<p class="text-gray-500 dark:text-gray-400">Activity log coming soon...</p>
</div>
</div>
</div>
</div>
<!-- Setup Wizard Tab -->
<div id="setupTab" class="tab-content">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<h2 class="text-2xl font-semibold mb-6 flex items-center">
<i class="fas fa-wizard-magic mr-2 text-purple-500"></i>Setup Wizard
</h2>
<form onsubmit="event.preventDefault(); saveConfiguration();" class="space-y-6">
<!-- Twilio Configuration -->
<div class="border-b border-gray-200 dark:border-gray-700 pb-6">
<h3 class="text-xl font-semibold mb-4">Twilio Configuration</h3>
<div class="space-y-4">
<div>
<label class="block mb-1 font-medium">Account SID</label>
<input type="text" id="twilioSid" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="ACxxxxxxxxxxxxxxxx">
</div>
<div>
<label class="block mb-1 font-medium">Auth Token</label>
<input type="password" id="twilioToken" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="xxxxxxxxxxxxxx">
</div>
<div>
<label class="block mb-1 font-medium">Twilio Phone Number</label>
<input type="text" id="twilioPhone" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="+15622289429">
</div>
</div>
</div>
<!-- Personal Phone Integration -->
<div class="border-b border-gray-200 dark:border-gray-700 pb-6">
<h3 class="text-xl font-semibold mb-4">Personal Phone Integration</h3>
<div class="space-y-4">
<div class="flex items-center">
<input type="checkbox" id="usePersonalNumber" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 dark:border-gray-600 rounded dark:bg-gray-700">
<label for="usePersonalNumber" class="ml-2 block font-medium">Use Personal Phone for Outgoing Messages</label>
</div>
<div>
<label class="block mb-1 font-medium">Your Verizon Phone Number</label>
<input type="text" id="personalPhone" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="+15551234567">
</div>
<div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
<h4 class="font-semibold mb-2">Important</h4>
<p class="text-sm text-blue-700 dark:text-blue-300">
<span class="font-semibold">Verizon Call Forwarding:</span><br>
• Dial *71 followed by your Twilio number to forward when busy<br>
• Dial *72 followed by your Twilio number to forward when unanswered
</p>
</div>
</div>
</div>
<!-- Model Configuration -->
<div class="border-b border-gray-200 dark:border-gray-700 pb-6">
<h3 class="text-xl font-semibold mb-4">Model & Platform</h3>
<div class="space-y-4">
<div class="flex items-center">
<input type="checkbox" id="useGpu" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 dark:border-gray-600 rounded dark:bg-gray-700">
<label for="useGpu" class="ml-2 block font-medium">Use GPU Acceleration (A100)</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="useCpu" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 dark:border-gray-600 rounded dark:bg-gray-700" checked>
<label for="useCpu" class="ml-2 block font-medium">Optimize for CPU (Zero GPU deployment)</label>
</div>
<div>
<label class="block mb-1 font-medium">Hugging Face API Token</label>
<input type="password" id="hfToken" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="hf_xxxxxxxxxxxxxxxx">
</div>
<div>
<label class="block mb-1 font-medium">Application Domain</label>
<input type="text" id="domain" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" placeholder="yourusername-vocal-chat-bot.hf.space">
</div>
</div>
</div>
<!-- Timing Settings -->
<div>
<h3 class="text-xl font-semibold mb-4">Timing Settings</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block mb-1 font-medium">SMS Response Timeout (seconds)</label>
<input type="number" id="smsTimeout" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" value="60" min="10" max="300">
</div>
<div>
<label class="block mb-1 font-medium">Call Answer Delay (seconds)</label>
<input type="number" id="callDelay" class="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700" value="15" min="0" max="60">
</div>
</div>
</div>
<button type="submit" class="w-full bg-blue-600 dark:bg-blue-700 hover:bg-blue-700 dark:hover:bg-blue-800 text-white py-3 rounded-lg font-medium">
<i class="fas fa-save mr-2"></i>Save Configuration
</button>
<p id="setupStatus" class="mt-3"></p>
</form>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-white mt-12">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h2 class="text-2xl font-bold">Jay's Mobile Wash</h2>
<p class="text-gray-400">AI Call Center Solution</p>
</div>
<div class="flex space-x-4">
<p class="text-gray-400">Current Version: 1.0.0</p>
<p class="text-gray-400">Deployed on Hugging Face Spaces</p>
</div>
</div>
<div class="mt-6 border-t border-gray-700 pt-6 text-center text-gray-400 text-sm">
<p>© 2025 Jay's Mobile Wash. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Dark mode functionality
const darkModeToggle = document.getElementById('darkModeToggle');
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const storedDarkMode = localStorage.getItem('darkMode');
// Set initial dark mode state
if (storedDarkMode === 'enabled' || (storedDark
<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=jjmandog/v" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |