Add 3 files
Browse files- README.md +7 -5
- index.html +405 -19
- prompts.txt +1 -0
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: chatbot2
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 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,405 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>ThaiGov AI Assistant</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;700&display=swap" rel="stylesheet">
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
+
<style>
|
| 11 |
+
:root {
|
| 12 |
+
--primary-color: #2c7be5;
|
| 13 |
+
--secondary-color: #00d97e;
|
| 14 |
+
--danger-color: #e63757;
|
| 15 |
+
--warning-color: #f6c343;
|
| 16 |
+
--dark-color: #12263f;
|
| 17 |
+
--light-color: #f9fafd;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
body {
|
| 21 |
+
font-family: 'Noto Sans Thai', sans-serif;
|
| 22 |
+
background-color: #f5f7fa;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.chat-bubble {
|
| 26 |
+
border-radius: 18px;
|
| 27 |
+
max-width: 80%;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.user-bubble {
|
| 31 |
+
border-bottom-right-radius: 4px;
|
| 32 |
+
background-color: var(--primary-color);
|
| 33 |
+
color: white;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.bot-bubble {
|
| 37 |
+
border-bottom-left-radius: 4px;
|
| 38 |
+
background-color: white;
|
| 39 |
+
color: var(--dark-color);
|
| 40 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.quick-reply {
|
| 44 |
+
transition: all 0.2s ease;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.quick-reply:hover {
|
| 48 |
+
transform: translateY(-2px);
|
| 49 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.high-contrast {
|
| 53 |
+
background-color: black !important;
|
| 54 |
+
color: white !important;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.high-contrast .bot-bubble {
|
| 58 |
+
background-color: black !important;
|
| 59 |
+
color: yellow !important;
|
| 60 |
+
border: 2px solid yellow !important;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.high-contrast .user-bubble {
|
| 64 |
+
background-color: yellow !important;
|
| 65 |
+
color: black !important;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.text-xxs {
|
| 69 |
+
font-size: 0.65rem;
|
| 70 |
+
}
|
| 71 |
+
</style>
|
| 72 |
+
</head>
|
| 73 |
+
<body class="relative h-screen overflow-hidden bg-gray-50" style="max-width: 360px; margin: 0 auto;">
|
| 74 |
+
<!-- App Header -->
|
| 75 |
+
<header class="bg-blue-600 text-white p-4 shadow-md">
|
| 76 |
+
<div class="flex items-center justify-between">
|
| 77 |
+
<button id="backBtn" class="text-white">
|
| 78 |
+
<i class="fas fa-chevron-left"></i>
|
| 79 |
+
</button>
|
| 80 |
+
<div class="flex items-center space-x-2">
|
| 81 |
+
<img src="https://img5.pic.in.th/file/secure-sv1/307460108_387435583599238_6386334495691428178_n-removebg-preview.png" alt="ThaiGov Logo" class="h-8">
|
| 82 |
+
<h1 class="font-bold text-lg">ThaiGov AI</h1>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="flex items-center space-x-3">
|
| 85 |
+
<button id="languageToggle" class="text-white text-sm">EN</button>
|
| 86 |
+
<button id="settingsBtn" class="text-white">
|
| 87 |
+
<i class="fas fa-cog"></i>
|
| 88 |
+
</button>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
</header>
|
| 92 |
+
|
| 93 |
+
<!-- Chat Container -->
|
| 94 |
+
<main class="h-[calc(100vh-120px)] overflow-y-auto pb-4 px-3 pt-2" id="chatContainer">
|
| 95 |
+
<!-- Welcome Message -->
|
| 96 |
+
<div class="flex mb-4">
|
| 97 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2">
|
| 98 |
+
<i class="fas fa-robot text-blue-600"></i>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="bot-bubble chat-bubble px-4 py-3">
|
| 101 |
+
<p class="font-medium">สวัสดีค่ะ! ยินดีต้อนรับสู่ ThaiGov AI Assistant</p>
|
| 102 |
+
<p class="text-sm mt-1">ฉันสามารถช่วยเหลือคุณในเรื่องบริการของรัฐบาลท้องถิ่นได้ทุกเวลา</p>
|
| 103 |
+
|
| 104 |
+
<div class="mt-3 grid grid-cols-2 gap-2">
|
| 105 |
+
<button class="quick-reply bg-blue-50 text-blue-600 rounded-full px-3 py-1 text-xs font-medium">
|
| 106 |
+
<i class="fas fa-file-alt mr-1"></i> ยื่นเอกสาร
|
| 107 |
+
</button>
|
| 108 |
+
<button class="quick-reply bg-blue-50 text-blue-600 rounded-full px-3 py-1 text-xs font-medium">
|
| 109 |
+
<i class="fas fa-calendar-alt mr-1"></i> นัดหมาย
|
| 110 |
+
</button>
|
| 111 |
+
<button class="quick-reply bg-blue-50 text-blue-600 rounded-full px-3 py-1 text-xs font-medium">
|
| 112 |
+
<i class="fas fa-money-bill-wave mr-1"></i> ชำระเงิน
|
| 113 |
+
</button>
|
| 114 |
+
<button class="quick-reply bg-blue-50 text-blue-600 rounded-full px-3 py-1 text-xs font-medium">
|
| 115 |
+
<i class="fas fa-question-circle mr-1"></i> คำถามทั่วไป
|
| 116 |
+
</button>
|
| 117 |
+
</div>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<!-- Emergency Shortcut -->
|
| 122 |
+
<div class="flex justify-center mb-4">
|
| 123 |
+
<button class="bg-red-100 text-red-600 rounded-full px-4 py-2 text-sm font-medium flex items-center">
|
| 124 |
+
<i class="fas fa-phone-alt mr-2"></i> เบอร์ฉุกเฉิน
|
| 125 |
+
</button>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<!-- Sample Chat -->
|
| 129 |
+
<div class="flex mb-4 justify-end">
|
| 130 |
+
<div class="user-bubble chat-bubble px-4 py-2">
|
| 131 |
+
<p>ฉันต้องการยื่นเอกสารสำหรับการแจ้งเกิด</p>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
|
| 135 |
+
<div class="flex mb-4">
|
| 136 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2">
|
| 137 |
+
<i class="fas fa-robot text-blue-600"></i>
|
| 138 |
+
</div>
|
| 139 |
+
<div class="bot-bubble chat-bubble px-4 py-3">
|
| 140 |
+
<p>สำหรับการแจ้งเกิด คุณสามารถ:</p>
|
| 141 |
+
<div class="mt-2 space-y-2">
|
| 142 |
+
<button class="quick-reply w-full text-left bg-blue-50 text-blue-600 rounded-lg px-3 py-2 text-sm font-medium flex items-center">
|
| 143 |
+
<i class="fas fa-file-pdf mr-2 text-red-500"></i> ดาวน์โหลดแบบฟอร์ม
|
| 144 |
+
</button>
|
| 145 |
+
<button class="quick-reply w-full text-left bg-blue-50 text-blue-600 rounded-lg px-3 py-2 text-sm font-medium flex items-center">
|
| 146 |
+
<i class="fas fa-upload mr-2 text-green-500"></i> อัปโหลดเอกสาร
|
| 147 |
+
</button>
|
| 148 |
+
<button class="quick-reply w-full text-left bg-blue-50 text-blue-600 rounded-lg px-3 py-2 text-sm font-medium flex items-center">
|
| 149 |
+
<i class="fas fa-map-marker-alt mr-2 text-orange-500"></i> สถานที่ยื่นเอกสาร
|
| 150 |
+
</button>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<!-- Document Upload Example -->
|
| 156 |
+
<div class="flex mb-4 justify-end">
|
| 157 |
+
<div class="user-bubble chat-bubble px-4 py-2">
|
| 158 |
+
<p>ฉันต้องการอัปโหลดเอกสาร</p>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<div class="flex mb-4">
|
| 163 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2">
|
| 164 |
+
<i class="fas fa-robot text-blue-600"></i>
|
| 165 |
+
</div>
|
| 166 |
+
<div class="bot-bubble chat-bubble px-4 py-3">
|
| 167 |
+
<p class="font-medium">ระบบอัปโหลดเอกสาร</p>
|
| 168 |
+
<p class="text-sm mt-1">กรุณาเลือกไฟล์ที่ต้องการอัปโหลด (PDF, JPG ไม่เกิน 5MB)</p>
|
| 169 |
+
|
| 170 |
+
<div class="mt-3 border-2 border-dashed border-blue-200 rounded-lg p-4 text-center">
|
| 171 |
+
<i class="fas fa-cloud-upload-alt text-blue-400 text-3xl mb-2"></i>
|
| 172 |
+
<p class="text-sm text-gray-500">ลากไฟล์มาวางที่นี่หรือคลิกเพื่อเลือกไฟล์</p>
|
| 173 |
+
<button class="mt-2 bg-blue-600 text-white rounded-full px-4 py-1 text-sm">
|
| 174 |
+
เลือกไฟล์
|
| 175 |
+
</button>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div class="mt-3 text-xs text-gray-500">
|
| 179 |
+
<i class="fas fa-lock"></i> ข้อมูลของคุณจะถูกเก็บเป็นความลับตาม พ.ร.บ. คุ้มครองข้อมูลส่วนบุคคล
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
</main>
|
| 184 |
+
|
| 185 |
+
<!-- Input Area -->
|
| 186 |
+
<footer class="absolute bottom-0 w-full bg-white border-t border-gray-200 p-3">
|
| 187 |
+
<div class="flex items-center space-x-2">
|
| 188 |
+
<button class="text-blue-600 p-2 rounded-full hover:bg-blue-50">
|
| 189 |
+
<i class="fas fa-paperclip"></i>
|
| 190 |
+
</button>
|
| 191 |
+
<button class="text-blue-600 p-2 rounded-full hover:bg-blue-50">
|
| 192 |
+
<i class="fas fa-microphone"></i>
|
| 193 |
+
</button>
|
| 194 |
+
<div class="flex-1 relative">
|
| 195 |
+
<input type="text" placeholder="พิมพ์ข้อความ..." class="w-full bg-gray-100 rounded-full px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 196 |
+
<button class="absolute right-2 top-1/2 transform -translate-y-1/2 text-blue-600">
|
| 197 |
+
<i class="fas fa-paper-plane"></i>
|
| 198 |
+
</button>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<!-- Quick Action Buttons -->
|
| 203 |
+
<div class="mt-2 flex justify-between text-xs text-center">
|
| 204 |
+
<button class="text-gray-600 px-2 py-1 rounded hover:bg-gray-100">
|
| 205 |
+
<i class="fas fa-home block mx-auto mb-1"></i>
|
| 206 |
+
หน้าหลัก
|
| 207 |
+
</button>
|
| 208 |
+
<button class="text-gray-600 px-2 py-1 rounded hover:bg-gray-100">
|
| 209 |
+
<i class="fas fa-file-alt block mx-auto mb-1"></i>
|
| 210 |
+
เอกสาร
|
| 211 |
+
</button>
|
| 212 |
+
<button class="text-gray-600 px-2 py-1 rounded hover:bg-gray-100">
|
| 213 |
+
<i class="fas fa-calendar block mx-auto mb-1"></i>
|
| 214 |
+
นัดหมาย
|
| 215 |
+
</button>
|
| 216 |
+
<button class="text-gray-600 px-2 py-1 rounded hover:bg-gray-100">
|
| 217 |
+
<i class="fas fa-wallet block mx-auto mb-1"></i>
|
| 218 |
+
ชำระเงิน
|
| 219 |
+
</button>
|
| 220 |
+
<button class="text-gray-600 px-2 py-1 rounded hover:bg-gray-100">
|
| 221 |
+
<i class="fas fa-user block mx-auto mb-1"></i>
|
| 222 |
+
บัญชี
|
| 223 |
+
</button>
|
| 224 |
+
</div>
|
| 225 |
+
</footer>
|
| 226 |
+
|
| 227 |
+
<!-- Settings Modal -->
|
| 228 |
+
<div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
|
| 229 |
+
<div class="bg-white rounded-lg w-full max-w-xs mx-4">
|
| 230 |
+
<div class="p-4 border-b border-gray-200 flex justify-between items-center">
|
| 231 |
+
<h3 class="font-bold text-lg">การตั้งค่า</h3>
|
| 232 |
+
<button id="closeSettings" class="text-gray-500">
|
| 233 |
+
<i class="fas fa-times"></i>
|
| 234 |
+
</button>
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
<div class="p-4 space-y-4">
|
| 238 |
+
<div>
|
| 239 |
+
<label class="block text-sm font-medium mb-1">ภาษา</label>
|
| 240 |
+
<div class="flex space-x-2">
|
| 241 |
+
<button class="bg-blue-600 text-white px-3 py-1 rounded-full text-sm">ไทย</button>
|
| 242 |
+
<button class="bg-gray-200 text-gray-700 px-3 py-1 rounded-full text-sm">English</button>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
|
| 246 |
+
<div>
|
| 247 |
+
<label class="block text-sm font-medium mb-1">ขนาดตัวอักษร</label>
|
| 248 |
+
<div class="flex items-center space-x-2">
|
| 249 |
+
<button class="text-gray-500">
|
| 250 |
+
<i class="fas fa-minus"></i>
|
| 251 |
+
</button>
|
| 252 |
+
<div class="flex-1 bg-gray-100 rounded-full h-2">
|
| 253 |
+
<div class="bg-blue-600 h-2 rounded-full w-3/4"></div>
|
| 254 |
+
</div>
|
| 255 |
+
<button class="text-gray-500">
|
| 256 |
+
<i class="fas fa-plus"></i>
|
| 257 |
+
</button>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<div class="flex items-center justify-between">
|
| 262 |
+
<label class="text-sm font-medium">โหมดความคมชัดสูง</label>
|
| 263 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 264 |
+
<input type="checkbox" class="sr-only peer">
|
| 265 |
+
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
|
| 266 |
+
</label>
|
| 267 |
+
</div>
|
| 268 |
+
|
| 269 |
+
<div class="flex items-center justify-between">
|
| 270 |
+
<label class="text-sm font-medium">การตอบสนองสัมผัส</label>
|
| 271 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 272 |
+
<input type="checkbox" class="sr-only peer" checked>
|
| 273 |
+
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
|
| 274 |
+
</label>
|
| 275 |
+
</div>
|
| 276 |
+
|
| 277 |
+
<div class="pt-4 border-t border-gray-200">
|
| 278 |
+
<button class="w-full bg-blue-600 text-white py-2 rounded-lg text-sm font-medium">
|
| 279 |
+
บันทึกการตั้งค่า
|
| 280 |
+
</button>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<!-- Emergency Contacts Modal -->
|
| 287 |
+
<div id="emergencyModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
|
| 288 |
+
<div class="bg-white rounded-lg w-full max-w-xs mx-4">
|
| 289 |
+
<div class="p-4 border-b border-gray-200 flex justify-between items-center">
|
| 290 |
+
<h3 class="font-bold text-lg">เบอร์ฉุกเฉิน</h3>
|
| 291 |
+
<button id="closeEmergency" class="text-gray-500">
|
| 292 |
+
<i class="fas fa-times"></i>
|
| 293 |
+
</button>
|
| 294 |
+
</div>
|
| 295 |
+
|
| 296 |
+
<div class="p-4 space-y-3">
|
| 297 |
+
<div class="flex items-center p-3 bg-red-50 rounded-lg">
|
| 298 |
+
<div class="bg-red-100 p-2 rounded-full mr-3">
|
| 299 |
+
<i class="fas fa-ambulance text-red-600"></i>
|
| 300 |
+
</div>
|
| 301 |
+
<div>
|
| 302 |
+
<p class="font-medium">รถพยาบาล</p>
|
| 303 |
+
<p class="text-sm text-gray-600">1669</p>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<div class="flex items-center p-3 bg-blue-50 rounded-lg">
|
| 308 |
+
<div class="bg-blue-100 p-2 rounded-full mr-3">
|
| 309 |
+
<i class="fas fa-shield-alt text-blue-600"></i>
|
| 310 |
+
</div>
|
| 311 |
+
<div>
|
| 312 |
+
<p class="font-medium">ตำรวจ</p>
|
| 313 |
+
<p class="text-sm text-gray-600">191</p>
|
| 314 |
+
</div>
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
<div class="flex items-center p-3 bg-orange-50 rounded-lg">
|
| 318 |
+
<div class="bg-orange-100 p-2 rounded-full mr-3">
|
| 319 |
+
<i class="fas fa-fire-extinguisher text-orange-600"></i>
|
| 320 |
+
</div>
|
| 321 |
+
<div>
|
| 322 |
+
<p class="font-medium">ดับเพลิง</p>
|
| 323 |
+
<p class="text-sm text-gray-600">199</p>
|
| 324 |
+
</div>
|
| 325 |
+
</div>
|
| 326 |
+
|
| 327 |
+
<div class="flex items-center p-3 bg-purple-50 rounded-lg">
|
| 328 |
+
<div class="bg-purple-100 p-2 rounded-full mr-3">
|
| 329 |
+
<i class="fas fa-life-ring text-purple-600"></i>
|
| 330 |
+
</div>
|
| 331 |
+
<div>
|
| 332 |
+
<p class="font-medium">ภัยพิบัติ</p>
|
| 333 |
+
<p class="text-sm text-gray-600">1784</p>
|
| 334 |
+
</div>
|
| 335 |
+
</div>
|
| 336 |
+
|
| 337 |
+
<div class="pt-4">
|
| 338 |
+
<button class="w-full border border-blue-600 text-blue-600 py-2 rounded-lg text-sm font-medium">
|
| 339 |
+
โทรออก
|
| 340 |
+
</button>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<script>
|
| 347 |
+
// DOM Elements
|
| 348 |
+
const settingsBtn = document.getElementById('settingsBtn');
|
| 349 |
+
const closeSettings = document.getElementById('closeSettings');
|
| 350 |
+
const settingsModal = document.getElementById('settingsModal');
|
| 351 |
+
const emergencyModal = document.getElementById('emergencyModal');
|
| 352 |
+
const closeEmergency = document.getElementById('closeEmergency');
|
| 353 |
+
const emergencyBtn = document.querySelector('.bg-red-100');
|
| 354 |
+
const languageToggle = document.getElementById('languageToggle');
|
| 355 |
+
const highContrastToggle = document.querySelector('input[type="checkbox"]');
|
| 356 |
+
const chatContainer = document.getElementById('chatContainer');
|
| 357 |
+
|
| 358 |
+
// Event Listeners
|
| 359 |
+
settingsBtn.addEventListener('click', () => {
|
| 360 |
+
settingsModal.classList.remove('hidden');
|
| 361 |
+
});
|
| 362 |
+
|
| 363 |
+
closeSettings.addEventListener('click', () => {
|
| 364 |
+
settingsModal.classList.add('hidden');
|
| 365 |
+
});
|
| 366 |
+
|
| 367 |
+
emergencyBtn.addEventListener('click', () => {
|
| 368 |
+
emergencyModal.classList.remove('hidden');
|
| 369 |
+
});
|
| 370 |
+
|
| 371 |
+
closeEmergency.addEventListener('click', () => {
|
| 372 |
+
emergencyModal.classList.add('hidden');
|
| 373 |
+
});
|
| 374 |
+
|
| 375 |
+
languageToggle.addEventListener('click', () => {
|
| 376 |
+
const currentLang = languageToggle.textContent;
|
| 377 |
+
languageToggle.textContent = currentLang === 'EN' ? 'TH' : 'EN';
|
| 378 |
+
// Here you would add language switching logic
|
| 379 |
+
});
|
| 380 |
+
|
| 381 |
+
highContrastToggle.addEventListener('change', (e) => {
|
| 382 |
+
if(e.target.checked) {
|
| 383 |
+
document.body.classList.add('high-contrast');
|
| 384 |
+
} else {
|
| 385 |
+
document.body.classList.remove('high-contrast');
|
| 386 |
+
}
|
| 387 |
+
});
|
| 388 |
+
|
| 389 |
+
// Simulate haptic feedback
|
| 390 |
+
document.querySelectorAll('button').forEach(btn => {
|
| 391 |
+
btn.addEventListener('click', () => {
|
| 392 |
+
// In a real app, we would use navigator.vibrate()
|
| 393 |
+
console.log("Haptic feedback triggered");
|
| 394 |
+
});
|
| 395 |
+
});
|
| 396 |
+
|
| 397 |
+
// Auto-scroll to bottom of chat
|
| 398 |
+
function scrollToBottom() {
|
| 399 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
scrollToBottom();
|
| 403 |
+
</script>
|
| 404 |
+
<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=kritsanan/chatbot2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 405 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Design a user-centric mobile interface for a Thai Local Government AI Chatbot application following these detailed specifications: Technical Requirements: - Mobile-first design optimized for 360x640px screens - Thai language primary interface with English language support - LINE platform integration capabilities - PDPA-compliant data handling and storage - Accessible design following WCAG 2.1 guidelines - API integration ready for local government systems Core Features: 1. Chat Interface - Clear message threading - Quick reply buttons for common queries - Voice command support - Custom Thai font optimization - Emergency contact shortcuts 2. User Experience - High contrast mode for elderly users - Voice-to-text input option - Adjustable text size - Haptic feedback - Offline mode capabilities 3. Administrative Functions - Document submission system - Appointment scheduling - Payment integration - Status tracking - Push notification system 4. Security & Privacy - Secure authentication - Data encryption - Privacy settings control - Consent management - Audit logging Development Process: Follow lovable.dev's 5-step methodology: 1. Discover: User research in Thai local context 2. Define: Feature prioritization based on community needs 3. Ideate: Interface wireframes with accessibility focus 4. Prototype: Interactive demo with Thai language support 5. Implement: Phased rollout with community feedback API Integration Requirements: - REST API endpoints for government systems - LINE Messaging API integration - Real-time data synchronization - Error handling protocols - Performance monitoring, <img src="https://img5.pic.in.th/file/secure-sv1/307460108_387435583599238_6386334495691428178_n-removebg-preview.png" alt="307460108 387435583599238 6386334495691428178 n removebg preview" border="0"> <img src="https://img5.pic.in.th/file/secure-sv1/image-154ab127eb3dcc1779.jpg" alt="image (15)" border="0"> <img src="https://img2.pic.in.th/pic/image-19f4bb7a9e083dc11a.jpg" alt="image (19)" border="0">
|