Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +340 -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: joung-joung
|
| 3 |
+
emoji: ๐ณ
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: green
|
| 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,340 @@
|
|
| 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="ko">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>๊ฑด๊ฐ ์๋ด ์ฑ๋ด - MediCare AI</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 |
+
@keyframes pulse {
|
| 11 |
+
0%, 100% { opacity: 1; }
|
| 12 |
+
50% { opacity: 0.5; }
|
| 13 |
+
}
|
| 14 |
+
.typing-indicator span {
|
| 15 |
+
animation: pulse 1.5s infinite ease-in-out;
|
| 16 |
+
}
|
| 17 |
+
.typing-indicator span:nth-child(2) {
|
| 18 |
+
animation-delay: 0.2s;
|
| 19 |
+
}
|
| 20 |
+
.typing-indicator span:nth-child(3) {
|
| 21 |
+
animation-delay: 0.4s;
|
| 22 |
+
}
|
| 23 |
+
.chat-container {
|
| 24 |
+
height: calc(100vh - 180px);
|
| 25 |
+
}
|
| 26 |
+
@media (max-width: 640px) {
|
| 27 |
+
.chat-container {
|
| 28 |
+
height: calc(100vh - 160px);
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
.message-animation {
|
| 32 |
+
animation: fadeIn 0.3s ease-out;
|
| 33 |
+
}
|
| 34 |
+
@keyframes fadeIn {
|
| 35 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 36 |
+
to { opacity: 1; transform: translateY(0); }
|
| 37 |
+
}
|
| 38 |
+
</style>
|
| 39 |
+
</head>
|
| 40 |
+
<body class="bg-gray-50 font-sans">
|
| 41 |
+
<div class="container mx-auto max-w-4xl px-4 py-6">
|
| 42 |
+
<!-- Header -->
|
| 43 |
+
<header class="flex items-center justify-between mb-6">
|
| 44 |
+
<div class="flex items-center space-x-3">
|
| 45 |
+
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center">
|
| 46 |
+
<i class="fas fa-user-md text-blue-600 text-xl"></i>
|
| 47 |
+
</div>
|
| 48 |
+
<div>
|
| 49 |
+
<h1 class="text-2xl font-bold text-gray-800">MediCare AI</h1>
|
| 50 |
+
<p class="text-sm text-gray-500">AI ๊ฑด๊ฐ ์๋ด ์ฑ๋ด</p>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
<div class="flex space-x-2">
|
| 54 |
+
<button class="p-2 rounded-full bg-gray-100 hover:bg-gray-200 text-gray-600">
|
| 55 |
+
<i class="fas fa-history"></i>
|
| 56 |
+
</button>
|
| 57 |
+
<button class="p-2 rounded-full bg-gray-100 hover:bg-gray-200 text-gray-600">
|
| 58 |
+
<i class="fas fa-cog"></i>
|
| 59 |
+
</button>
|
| 60 |
+
</div>
|
| 61 |
+
</header>
|
| 62 |
+
|
| 63 |
+
<!-- Chat Container -->
|
| 64 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-4 chat-container" id="chatContainer">
|
| 65 |
+
<!-- Welcome Message -->
|
| 66 |
+
<div class="p-4 border-b border-gray-100 bg-blue-50">
|
| 67 |
+
<div class="flex space-x-3">
|
| 68 |
+
<div class="flex-shrink-0">
|
| 69 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
|
| 70 |
+
<i class="fas fa-user-md text-blue-600 text-sm"></i>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
<div class="message-animation">
|
| 74 |
+
<div class="text-sm font-medium text-gray-700">MediCare AI</div>
|
| 75 |
+
<div class="mt-1 text-sm text-gray-600">
|
| 76 |
+
์๋
ํ์ธ์! MediCare AI ๊ฑด๊ฐ ์๋ด ์ฑ๋ด์
๋๋ค. <br>
|
| 77 |
+
์ด๋ค ๊ฑด๊ฐ ๊ด๋ จ ๋ฌธ์ ๋ก ๋์์ ๋๋ฆด๊น์? <br>
|
| 78 |
+
์ฆ์, ๋ณต์ฉ ์ค์ธ ์ฝ๋ฌผ, ๋๋ ๊ฑด๊ฐ ๊ด๋ จ ์ง๋ฌธ์ ์๋ ค์ฃผ์ธ์.
|
| 79 |
+
</div>
|
| 80 |
+
<div class="mt-3 flex flex-wrap gap-2">
|
| 81 |
+
<button onclick="quickQuestion('๋ํต์ด ์ฌํด์')" class="px-3 py-1 text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 rounded-full border border-blue-100 transition">
|
| 82 |
+
๋ํต์ด ์ฌํด์
|
| 83 |
+
</button>
|
| 84 |
+
<button onclick="quickQuestion('๋ณตํต์ด ์์ด์')" class="px-3 py-1 text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 rounded-full border border-blue-100 transition">
|
| 85 |
+
๋ณตํต์ด ์์ด์
|
| 86 |
+
</button>
|
| 87 |
+
<button onclick="quickQuestion('๊ฐ๊ธฐ ์ฆ์์ด ์์ด์')" class="px-3 py-1 text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 rounded-full border border-blue-100 transition">
|
| 88 |
+
๊ฐ๊ธฐ ์ฆ์์ด ์์ด์
|
| 89 |
+
</button>
|
| 90 |
+
<button onclick="quickQuestion('์คํธ๋ ์ค ๊ด๋ฆฌ ๋ฐฉ๋ฒ')" class="px-3 py-1 text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 rounded-full border border-blue-100 transition">
|
| 91 |
+
์คํธ๋ ์ค ๊ด๋ฆฌ ๋ฐฉ๋ฒ
|
| 92 |
+
</button>
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
</div>
|
| 97 |
+
|
| 98 |
+
<!-- Chat Messages will be appended here -->
|
| 99 |
+
<div id="chatMessages" class="overflow-y-auto h-full p-4 space-y-4"></div>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<!-- Input Area -->
|
| 103 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 104 |
+
<div class="flex items-center space-x-2">
|
| 105 |
+
<button class="p-2 rounded-full text-gray-500 hover:bg-gray-100">
|
| 106 |
+
<i class="fas fa-plus"></i>
|
| 107 |
+
</button>
|
| 108 |
+
<div class="flex-grow relative">
|
| 109 |
+
<input
|
| 110 |
+
type="text"
|
| 111 |
+
id="userInput"
|
| 112 |
+
placeholder="์ฆ์์ด๋ ๊ฑด๊ฐ ๊ด๋ จ ์ง๋ฌธ์ ์
๋ ฅํ์ธ์..."
|
| 113 |
+
class="w-full py-3 px-4 border border-gray-200 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
| 114 |
+
onkeypress="handleKeyPress(event)"
|
| 115 |
+
>
|
| 116 |
+
<button class="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-blue-500">
|
| 117 |
+
<i class="far fa-smile"></i>
|
| 118 |
+
</button>
|
| 119 |
+
</div>
|
| 120 |
+
<button onclick="sendMessage()" class="p-3 rounded-full bg-blue-600 text-white hover:bg-blue-700 transition">
|
| 121 |
+
<i class="fas fa-paper-plane"></i>
|
| 122 |
+
</button>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="mt-3 text-xs text-gray-500 text-center">
|
| 125 |
+
์ฐธ๊ณ : ์ด ์ฑ๋ด์ ์ ๋ฌธ ์๋ฃ ์๋ด์ ๋์ฒดํ์ง ์์ต๋๋ค. ์ฌ๊ฐํ ์ฆ์์ด ์์ ๊ฒฝ์ฐ ์ฆ์ ๋ณ์์ ๋ฐฉ๋ฌธํ์ธ์.
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<!-- Quick Action Buttons (Mobile) -->
|
| 130 |
+
<div class="sm:hidden mt-4 flex justify-around">
|
| 131 |
+
<button onclick="quickQuestion('์๊ธ ์ํฉ์ด์์')" class="px-4 py-2 bg-red-100 hover:bg-red-200 text-red-600 rounded-full text-sm font-medium">
|
| 132 |
+
<i class="fas fa-bell mr-1"></i> ์๊ธ
|
| 133 |
+
</button>
|
| 134 |
+
<button onclick="showSymptomsList()" class="px-4 py-2 bg-green-100 hover:bg-green-200 text-green-600 rounded-full text-sm font-medium">
|
| 135 |
+
<i class="fas fa-list-ul mr-1"></i> ์ฆ์ ๋ชฉ๋ก
|
| 136 |
+
</button>
|
| 137 |
+
<button onclick="quickQuestion('๋ณ์ ์ฐพ๊ธฐ')" class="px-4 py-2 bg-purple-100 hover:bg-purple-200 text-purple-600 rounded-full text-sm font-medium">
|
| 138 |
+
<i class="fas fa-hospital mr-1"></i> ๋ณ์ ์ฐพ๊ธฐ
|
| 139 |
+
</button>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
<script>
|
| 144 |
+
// Sample responses for demonstration
|
| 145 |
+
const botResponses = {
|
| 146 |
+
"๋ํต์ด ์ฌํด์": [
|
| 147 |
+
"๋ํต์ด ์ฌํ์๊ตฐ์. ๋ช ๊ฐ์ง ์ถ๊ฐ ์ ๋ณด๋ฅผ ์๋ ค์ฃผ์๊ฒ ์ด์?",
|
| 148 |
+
"1. ๋ํต์ด ์ผ๋ง๋ ์ง์๋์๋์? (๋ช ์๊ฐ/๋ช ์ผ)",
|
| 149 |
+
"2. ์ด๋ ๋ถ์๊ฐ ์ํ์ ๊ฐ์? (์ด๋ง, ๋ท๋ชฉ, ํ์ชฝ ๋ฑ)",
|
| 150 |
+
"3. ์ถ๊ฐ ์ฆ์์ด ์๋์? (๊ตฌํ , ์์ผ ์ด์, ๋ฐ์ด ๋ฑ)",
|
| 151 |
+
"์ผ๋ฐ์ ์ผ๋ก ์คํธ๋ ์ค, ์๋ฉด ๋ถ์กฑ, ํ์ ๋ฑ์ด ๋ํต์ ์์ธ์ด ๋ ์ ์์ต๋๋ค. ์ถฉ๋ถํ ํด์๊ณผ ๋ฌผ ์ญ์ทจ๋ฅผ ๊ถ์ฅ๋๋ฆฝ๋๋ค. ํ์ง๋ง ์ง์๋๊ฑฐ๋ ์ฌํด์ง๋ฉด ๋ณ์์ ๋ฐฉ๋ฌธํ์๊ธธ ๋ฐ๋๋๋ค."
|
| 152 |
+
],
|
| 153 |
+
"๋ณตํต์ด ์์ด์": [
|
| 154 |
+
"๋ณตํต์ด ์์ผ์๊ตฐ์. ๋ ์์ธํ ์ค๋ช
ํด์ฃผ์ค ์ ์๋์?",
|
| 155 |
+
"1. ์ด๋ ๋ถ์๊ฐ ์ํ์ ๊ฐ์? (์, ๋ฐฐ๊ผฝ ์ฃผ๋ณ, ์๋ซ๋ฐฐ ๋ฑ)",
|
| 156 |
+
"2. ํต์ฆ์ ์ฑ๊ฒฉ์ด ์ด๋ป๊ฒ ๋๋์? (์ฐ๋ฅด๋ ๋ฏ, ๋ฌต์งํ, ์ฅ์ด์ง๋ ๋ฏ ๋ฑ)",
|
| 157 |
+
"3. ์ถ๊ฐ ์ฆ์์ด ์๋์? (์ค์ฌ, ๋ณ๋น, ๊ตฌํ , ๋ฐ์ด ๋ฑ)",
|
| 158 |
+
"๊ฐ๋ฒผ์ด ๋ณตํต์ ๊ฒฝ์ฐ ์ํ๋ถ๋, ๊ฐ์ค ์ฐจ์, ์์ค๋
๋ฑ์ด ์์ธ์ผ ์ ์์ต๋๋ค. ํ์ง๋ง ๊ธ์ฑ ๋งน์ฅ์ผ์ด๋ ๋ค๋ฅธ ์ค์ฆ ์งํ์ ๊ฐ๋ฅ์ฑ๋ ์์ผ๋ ํต์ฆ์ด ์ฌํ๊ฑฐ๋ ์ง์๋๋ฉด ๋ฐ๋์ ๋ณ์์ ๋ฐฉ๋ฌธํ์ธ์."
|
| 159 |
+
],
|
| 160 |
+
"๊ฐ๊ธฐ ์ฆ์์ด ์์ด์": [
|
| 161 |
+
"๊ฐ๊ธฐ ์ฆ์์ด ์์ผ์๊ตฐ์. ์ด๋ค ์ฆ์์ด ์๋์?",
|
| 162 |
+
"1. ๋ฐ์ด์ด ์๋์? ์๋ค๋ฉด ์ฒด์จ์ ์ด๋ป๊ฒ ๋๋์?",
|
| 163 |
+
"2. ๊ธฐ์นจ, ์ธํํต, ์ฝง๋ฌผ ์ค ์ด๋ค ์ฆ์์ด ์๋์?",
|
| 164 |
+
"3. ์ฆ์์ด ์ผ๋ง๋ ์ง์๋์๋์?",
|
| 165 |
+
"๊ฐ๊ธฐ๋ ๋๊ฐ 7-10์ผ ์ ๋ ์ง์๋ฉ๋๋ค. ์ถฉ๋ถํ ํด์๊ณผ ์๋ถ ์ญ์ทจ, ๋นํ๋ฏผ ์ญ์ทจ๊ฐ ๋์์ด ๋ฉ๋๋ค. ๊ณ ์ด(38.5ยฐC ์ด์)์ด ์ง์๋๊ฑฐ๋ ํธํก๊ณค๋ ๋ฑ์ด ์์ผ๋ฉด ๋ณ์์ ๋ฐฉ๋ฌธํ์ธ์."
|
| 166 |
+
],
|
| 167 |
+
"์คํธ๋ ์ค ๊ด๋ฆฌ ๋ฐฉ๋ฒ": [
|
| 168 |
+
"์คํธ๋ ์ค ๊ด๋ฆฌ๋ ๊ฑด๊ฐ ์ ์ง์ ๋งค์ฐ ์ค์ํฉ๋๋ค. ๋ช ๊ฐ์ง ๋ฐฉ๋ฒ์ ๏ฟฝ๏ฟฝ๋ ค๋๋ฆด๊ฒ์:",
|
| 169 |
+
"1. ๊ท์น์ ์ธ ์ด๋: ํ๋ฃจ 30๋ถ ์ ๋์ ์ ์ฐ์ ์ด๋์ด ๋์์ด ๋ฉ๋๋ค.",
|
| 170 |
+
"2. ์ถฉ๋ถํ ์๋ฉด: ํ๋ฃจ 7-8์๊ฐ์ ์ง ์ข์ ์๋ฉด์ ์ทจํ์ธ์.",
|
| 171 |
+
"3. ๋ช
์ ๋๋ ์ฌํธํก: ํ๋ฃจ 5-10๋ถ์ฉ ๋ช
์์ด๋ ๊น์ ํธํก์ ํด๋ณด์ธ์.",
|
| 172 |
+
"4. ์ทจ๋ฏธ ํ๋: ์ฆ๊ฑฐ์์ ์ฃผ๋ ํ๋์ ์๊ฐ์ ํ ๋นํ์ธ์.",
|
| 173 |
+
"5. ์ฌํ์ ์ง์: ์น๊ตฌ๋ ๊ฐ์กฑ๊ณผ์ ๋ํ๊ฐ ํฐ ๋์์ด ๋ฉ๋๋ค.",
|
| 174 |
+
"์คํธ๋ ์ค๊ฐ ์ง์๋์ด ์ผ์ ์ํ์ ์ง์ฅ์ ์ค๋ค๋ฉด ์ ๋ฌธ๊ฐ์ ์๋ดํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค."
|
| 175 |
+
],
|
| 176 |
+
"์๊ธ ์ํฉ์ด์์": [
|
| 177 |
+
"<span class='font-bold text-red-600'>์๊ธ ์ํฉ์ธ ๊ฒฝ์ฐ ์ฆ์ 119์ ์ฐ๋ฝํ๊ฑฐ๋ ๊ฐ๊น์ด ์๊ธ์ค์ ๋ฐฉ๋ฌธํ์ธ์.</span>",
|
| 178 |
+
"๋ค์๊ณผ ๊ฐ์ ์ฆ์์ด ์์ผ๋ฉด ์ฆ์ ์๊ธ์ฒ์น๊ฐ ํ์ํฉ๋๋ค:",
|
| 179 |
+
"- ํธํก๊ณค๋ ๋๋ ์จ์ ์ด ์ ์์",
|
| 180 |
+
"- ์ฌํ ๊ฐ์ด ํต์ฆ ๋๋ ์๋ฐ๊ฐ",
|
| 181 |
+
"- ์์ ์์ค ๋๋ ํผ๋ ์ํ",
|
| 182 |
+
"- ์ฌํ ์ถํ",
|
| 183 |
+
"- ์ฌํ ๋ํต๊ณผ ํจ๊ป ๊ตฌํ ๋๋ ์์ผ ์ด์",
|
| 184 |
+
"์ด ์ฑ๋ด์ ์๊ธ ์ํฉ์ ๋์ฒํ ์ ์์ต๋๋ค. ์ํ ๊ฐ๋ฅ์ฑ์ด ์๋ค๊ณ ํ๋จ๋๋ฉด ์ฆ์ ์ ๋ฌธ ์๋ฃ๊ธฐ๊ด์ ์ฐพ์ผ์ธ์."
|
| 185 |
+
],
|
| 186 |
+
"๋ณ์ ์ฐพ๊ธฐ": [
|
| 187 |
+
"๊ฐ๊น์ด ๋ณ์์ ์ฐพ๊ณ ๊ณ์๊ตฐ์. ํ์ฌ ์์น ๊ธฐ๋ฐ์ผ๋ก ๊ฒ์ํ ์ ์์ต๋๋ค.",
|
| 188 |
+
"1. <button class='text-blue-600 underline'>๋ด ์์น์์ ๊ฐ๊น์ด ๋ณ์ ์ฐพ๊ธฐ</button>",
|
| 189 |
+
"2. <button class='text-blue-600 underline'>์๊ธ์ค์ด ์๋ ๋ณ์ ์ฐพ๊ธฐ</button>",
|
| 190 |
+
"3. <button class='text-blue-600 underline'>์ผ๊ฐ์ง๋ฃ ๊ฐ๋ฅ ๋ณ์ ์ฐพ๊ธฐ</button>",
|
| 191 |
+
"๋ ์ ํํ ์ ๋ณด๋ฅผ ์ํ์๋ฉด ๋ณด๊ฑด๋ณต์ง๋ถ ํํ์ด์ง(www.mohw.go.kr) ๋๋ ์ง์ญ ๋ณด๊ฑด์์ ๋ฌธ์ํ์ค ์ ์์ต๋๋ค."
|
| 192 |
+
],
|
| 193 |
+
"default": [
|
| 194 |
+
"์ดํดํ์ง ๋ชปํ์ด์. ๊ฑด๊ฐ ๊ด๋ จ ์ฆ์์ด๋ ์ง๋ฌธ์ ๋ ์์ธํ ์ค๋ช
ํด์ฃผ์๊ฒ ์ด์?",
|
| 195 |
+
"์๋ฅผ ๋ค์ด ๋ค์๊ณผ ๊ฐ์ด ์ง๋ฌธํ ์ ์์ต๋๋ค:",
|
| 196 |
+
"- \"์ด์ ๋ถํฐ ์ด์ด 38๋ ๋๊ณ ๊ธฐ์นจ์ด ๋์\"",
|
| 197 |
+
"- \"์ผ์ชฝ ํ์ ์ ๋ฆผ ํ์์ด ์๋๋ฐ ์ด๋ค ๊ฒ ์์ธ์ผ๊น์?\"",
|
| 198 |
+
"- \"ํ์์ ๋ฎ์ถ๋ ์์ฐ์ ์ธ ๋ฐฉ๋ฒ์ด ์์๊น์?\""
|
| 199 |
+
]
|
| 200 |
+
};
|
| 201 |
+
|
| 202 |
+
// Function to send message
|
| 203 |
+
function sendMessage() {
|
| 204 |
+
const userInput = document.getElementById('userInput');
|
| 205 |
+
const message = userInput.value.trim();
|
| 206 |
+
|
| 207 |
+
if (message === '') return;
|
| 208 |
+
|
| 209 |
+
// Add user message to chat
|
| 210 |
+
addMessageToChat(message, 'user');
|
| 211 |
+
userInput.value = '';
|
| 212 |
+
|
| 213 |
+
// Show typing indicator
|
| 214 |
+
showTypingIndicator();
|
| 215 |
+
|
| 216 |
+
// Simulate bot thinking
|
| 217 |
+
setTimeout(() => {
|
| 218 |
+
// Remove typing indicator
|
| 219 |
+
removeTypingIndicator();
|
| 220 |
+
|
| 221 |
+
// Generate bot response
|
| 222 |
+
let response;
|
| 223 |
+
for (const key in botResponses) {
|
| 224 |
+
if (message.toLowerCase().includes(key.toLowerCase())) {
|
| 225 |
+
response = botResponses[key];
|
| 226 |
+
break;
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
if (!response) {
|
| 231 |
+
response = botResponses['default'];
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
// Add bot response to chat
|
| 235 |
+
response.forEach((line, index) => {
|
| 236 |
+
setTimeout(() => {
|
| 237 |
+
addMessageToChat(line, 'bot');
|
| 238 |
+
}, index * 500);
|
| 239 |
+
});
|
| 240 |
+
|
| 241 |
+
}, 1000 + Math.random() * 1000);
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
// Function to handle quick questions
|
| 245 |
+
function quickQuestion(question) {
|
| 246 |
+
document.getElementById('userInput').value = question;
|
| 247 |
+
sendMessage();
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
// Function to show symptoms list
|
| 251 |
+
function showSymptomsList() {
|
| 252 |
+
const symptoms = [
|
| 253 |
+
"๋ํต", "๋ณตํต", "๋ฐ์ด", "๊ธฐ์นจ", "์ธํํต",
|
| 254 |
+
"๋ฉ์ค๊บผ์", "๊ตฌํ ", "ํ๊ธฐ์ฆ", "ํผ๋ก๊ฐ",
|
| 255 |
+
"ํธํก๊ณค๋", "ํํต", "๊ด์ ํต", "๊ทผ์กํต",
|
| 256 |
+
"์ค์ฌ", "๋ณ๋น", "ํผ๋ถ ๋ฐ์ง", "์์ผ ์ด์"
|
| 257 |
+
];
|
| 258 |
+
|
| 259 |
+
let message = "<div class='font-medium mb-2'>์ฆ์ ๋ชฉ๋ก:</div><div class='flex flex-wrap gap-2'>";
|
| 260 |
+
symptoms.forEach(symptom => {
|
| 261 |
+
message += `<button onclick="quickQuestion('${symptom}์ด ์์ด์')" class="px-3 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-full">${symptom}</button>`;
|
| 262 |
+
});
|
| 263 |
+
message += "</div>";
|
| 264 |
+
|
| 265 |
+
addMessageToChat(message, 'bot');
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// Function to add message to chat
|
| 269 |
+
function addMessageToChat(message, sender) {
|
| 270 |
+
const chatMessages = document.getElementById('chatMessages');
|
| 271 |
+
const messageDiv = document.createElement('div');
|
| 272 |
+
messageDiv.className = 'message-animation';
|
| 273 |
+
|
| 274 |
+
if (sender === 'user') {
|
| 275 |
+
messageDiv.innerHTML = `
|
| 276 |
+
<div class="flex justify-end">
|
| 277 |
+
<div class="max-w-xs sm:max-w-md md:max-w-lg bg-blue-600 text-white rounded-xl px-4 py-2">
|
| 278 |
+
${message}
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
`;
|
| 282 |
+
} else {
|
| 283 |
+
messageDiv.innerHTML = `
|
| 284 |
+
<div class="flex space-x-3">
|
| 285 |
+
<div class="flex-shrink-0">
|
| 286 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
|
| 287 |
+
<i class="fas fa-user-md text-blue-600 text-sm"></i>
|
| 288 |
+
</div>
|
| 289 |
+
</div>
|
| 290 |
+
<div class="max-w-xs sm:max-w-md md:max-w-lg bg-gray-100 text-gray-800 rounded-xl px-4 py-2">
|
| 291 |
+
${message}
|
| 292 |
+
</div>
|
| 293 |
+
</div>
|
| 294 |
+
`;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
chatMessages.appendChild(messageDiv);
|
| 298 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
// Function to show typing indicator
|
| 302 |
+
function showTypingIndicator() {
|
| 303 |
+
const chatMessages = document.getElementById('chatMessages');
|
| 304 |
+
const typingDiv = document.createElement('div');
|
| 305 |
+
typingDiv.className = 'flex space-x-3';
|
| 306 |
+
typingDiv.id = 'typingIndicator';
|
| 307 |
+
typingDiv.innerHTML = `
|
| 308 |
+
<div class="flex-shrink-0">
|
| 309 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
|
| 310 |
+
<i class="fas fa-user-md text-blue-600 text-sm"></i>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
<div class="bg-gray-100 text-gray-800 rounded-xl px-4 py-2">
|
| 314 |
+
<div class="typing-indicator">
|
| 315 |
+
<span>.</span><span>.</span><span>.</span>
|
| 316 |
+
</div>
|
| 317 |
+
</div>
|
| 318 |
+
`;
|
| 319 |
+
|
| 320 |
+
chatMessages.appendChild(typingDiv);
|
| 321 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
// Function to remove typing indicator
|
| 325 |
+
function removeTypingIndicator() {
|
| 326 |
+
const typingIndicator = document.getElementById('typingIndicator');
|
| 327 |
+
if (typingIndicator) {
|
| 328 |
+
typingIndicator.remove();
|
| 329 |
+
}
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
// Function to handle enter key press
|
| 333 |
+
function handleKeyPress(event) {
|
| 334 |
+
if (event.key === 'Enter') {
|
| 335 |
+
sendMessage();
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
</script>
|
| 339 |
+
<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=joung/joung-joung" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 340 |
+
</html>
|