Spaces:
Running
Running
Add 1 files
Browse files- index.html +123 -129
index.html
CHANGED
|
@@ -3,116 +3,98 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<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 |
-
<
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
to { opacity: 1; transform: translateY(0); }
|
| 25 |
}
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
| 29 |
-
.chat-log::-webkit-scrollbar
|
| 30 |
-
|
| 31 |
-
border-radius: 10px;
|
| 32 |
}
|
| 33 |
.chat-log::-webkit-scrollbar-thumb {
|
| 34 |
-
background: #
|
| 35 |
-
border-radius:
|
| 36 |
}
|
| 37 |
-
.
|
| 38 |
-
|
|
|
|
| 39 |
}
|
| 40 |
</style>
|
| 41 |
</head>
|
| 42 |
-
<body class="bg-
|
| 43 |
-
<
|
| 44 |
-
|
| 45 |
-
<
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
<
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
<
|
| 54 |
-
</div>
|
| 55 |
-
<div class="ml-auto flex space-x-2">
|
| 56 |
-
<button class="text-white/80 hover:text-white transition">
|
| 57 |
-
<i class="fas fa-ellipsis-v"></i>
|
| 58 |
-
</button>
|
| 59 |
</div>
|
| 60 |
</div>
|
| 61 |
|
| 62 |
-
<!-- Chat
|
| 63 |
-
<div class="chat-log h-
|
| 64 |
-
<
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
<img src="https://i.imgur.com/J1Rtzux.png" alt="Rimi" class="w-8 h-8 rounded-full">
|
| 68 |
</div>
|
| 69 |
-
<div class="
|
| 70 |
-
<
|
| 71 |
-
|
|
|
|
|
|
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
</div>
|
| 75 |
|
| 76 |
<!-- Input Area -->
|
| 77 |
-
<div class="border-t border-gray-200 p-4 bg-
|
| 78 |
-
<div class="flex items-center">
|
| 79 |
-
<div class="
|
| 80 |
<input
|
| 81 |
type="text"
|
| 82 |
id="userInput"
|
| 83 |
-
placeholder="
|
| 84 |
-
class="w-full
|
| 85 |
onkeypress="if(event.keyCode==13) sendMessage()"
|
| 86 |
>
|
| 87 |
-
<button class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-purple-600">
|
| 88 |
-
<i class="far fa-smile"></i>
|
| 89 |
-
</button>
|
| 90 |
</div>
|
| 91 |
<button
|
| 92 |
onclick="sendMessage()"
|
| 93 |
-
class="
|
|
|
|
| 94 |
>
|
| 95 |
-
<i class="fas fa-paper-plane"></i>
|
| 96 |
-
</button>
|
| 97 |
-
</div>
|
| 98 |
-
<div class="flex justify-start mt-2 space-x-1">
|
| 99 |
-
<button onclick="quickMessage('I want to check in')" class="text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition">
|
| 100 |
-
Check In
|
| 101 |
-
</button>
|
| 102 |
-
<button onclick="quickMessage('Room availability')" class="text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition">
|
| 103 |
-
Rooms
|
| 104 |
-
</button>
|
| 105 |
-
<button onclick="quickMessage('Show amenities')" class="text-xs bg-gray-100 hover:bg-gray-200 rounded-full px-3 py-1 transition">
|
| 106 |
-
Amenities
|
| 107 |
</button>
|
| 108 |
</div>
|
| 109 |
</div>
|
| 110 |
</div>
|
| 111 |
-
|
| 112 |
-
<!-- Footer -->
|
| 113 |
-
<div class="mt-6 text-xs text-gray-500 text-center">
|
| 114 |
-
<p>Powered by Hotel Arcane's AI Concierge System • 24/7 Assistance</p>
|
| 115 |
-
</div>
|
| 116 |
|
| 117 |
<script>
|
| 118 |
// Display current time
|
|
@@ -128,26 +110,31 @@
|
|
| 128 |
const userInput = document.getElementById('userInput');
|
| 129 |
|
| 130 |
function appendMessage(sender, text) {
|
|
|
|
|
|
|
|
|
|
| 131 |
const messageDiv = document.createElement('div');
|
| 132 |
-
messageDiv.className = `flex
|
| 133 |
|
| 134 |
if (sender === 'user') {
|
| 135 |
messageDiv.innerHTML = `
|
| 136 |
-
<div class="ml-auto">
|
| 137 |
-
<div class="bg-
|
| 138 |
-
<p class="text-sm">${text}</p>
|
| 139 |
-
<p class="text-xs text-blue-100 mt-1 text-right">Just now</p>
|
| 140 |
</div>
|
|
|
|
| 141 |
</div>
|
| 142 |
`;
|
| 143 |
} else {
|
| 144 |
messageDiv.innerHTML = `
|
| 145 |
-
<div class="
|
| 146 |
-
<
|
| 147 |
</div>
|
| 148 |
-
<div class="
|
| 149 |
-
<
|
| 150 |
-
|
|
|
|
|
|
|
| 151 |
</div>
|
| 152 |
`;
|
| 153 |
}
|
|
@@ -156,20 +143,17 @@
|
|
| 156 |
return messageDiv;
|
| 157 |
}
|
| 158 |
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
}
|
| 168 |
-
}
|
| 169 |
|
| 170 |
-
function
|
| 171 |
-
|
| 172 |
-
sendMessage();
|
| 173 |
}
|
| 174 |
|
| 175 |
function sendMessage() {
|
|
@@ -179,40 +163,50 @@
|
|
| 179 |
appendMessage('user', userText);
|
| 180 |
userInput.value = '';
|
| 181 |
|
| 182 |
-
// Simulate typing delay
|
| 183 |
-
const typingIndicator = appendMessage('rimi', '...');
|
| 184 |
-
|
| 185 |
setTimeout(() => {
|
| 186 |
-
|
| 187 |
-
let reply = "I'm sorry, I didn't understand that. Can you please rephrase? 😊";
|
| 188 |
|
| 189 |
-
const lowerText = userText.toLowerCase();
|
| 190 |
-
if (lowerText.includes('check in') || lowerText.includes('arrival')) {
|
| 191 |
-
reply = "Welcome to Hotel Arcane! 🎉 May I have your booking reference or the name under which the reservation was made?";
|
| 192 |
-
}
|
| 193 |
-
else if (lowerText.includes('room') || lowerText.includes('available')) {
|
| 194 |
-
reply = "We have several room types available:\n\n✨ Deluxe Room - $200/night\n✨ Executive Suite - $350/night\n✨ Presidential Suite - $600/night\n\nWould you like to book one?";
|
| 195 |
-
}
|
| 196 |
-
else if (lowerText.includes('amen') || lowerText.includes('facility') || lowerText.includes('service')) {
|
| 197 |
-
reply = "Our amenities include:\n🏊 24/7 Rooftop Pool\n🍽️ 5-Star Restaurant\n🏋️♂️ Fully Equipped Gym\n💆 Luxury Spa\n🚕 Concierge Service\n\nWould you like more details about any of these?";
|
| 198 |
-
}
|
| 199 |
-
else if (lowerText.includes('reservation') || lowerText.includes('booking')) {
|
| 200 |
-
reply = "Please provide your booking reference number or the name used for the reservation and I'll check the details for you. 📝";
|
| 201 |
-
}
|
| 202 |
-
else if (lowerText.includes('hello') || lowerText.includes('hi')) {
|
| 203 |
-
reply = "Hello there! 😊 How may I assist you during your stay at Hotel Arcane?";
|
| 204 |
-
}
|
| 205 |
-
else if (lowerText.includes('thanks') || lowerText.includes('thank you')) {
|
| 206 |
-
reply = "You're most welcome! It's my pleasure to assist you. If you need anything else, don't hesitate to ask. 😊";
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
// Update the typing indicator with the actual response after delay
|
| 210 |
setTimeout(() => {
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
</script>
|
| 217 |
<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=chipmonktalent/rimi" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 218 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Hotel Arcane 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 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
'hotel-primary': '#1F2937',
|
| 15 |
+
'hotel-secondary': '#4B5563',
|
| 16 |
+
'hotel-accent': '#1D4ED8',
|
| 17 |
+
},
|
| 18 |
+
spacing: {
|
| 19 |
+
'chat-height': '32rem',
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
}
|
| 24 |
+
</script>
|
| 25 |
+
<style>
|
| 26 |
+
@keyframes fadeIn {
|
| 27 |
+
from { opacity: 0; transform: translateY(4px); }
|
| 28 |
to { opacity: 1; transform: translateY(0); }
|
| 29 |
}
|
| 30 |
+
.message {
|
| 31 |
+
animation: fadeIn 0.2s ease-out forwards;
|
| 32 |
}
|
| 33 |
+
.chat-log::-webkit-scrollbar {
|
| 34 |
+
width: 4px;
|
|
|
|
| 35 |
}
|
| 36 |
.chat-log::-webkit-scrollbar-thumb {
|
| 37 |
+
background: #E5E7EB;
|
| 38 |
+
border-radius: 2px;
|
| 39 |
}
|
| 40 |
+
.input-focus {
|
| 41 |
+
transition: all 0.2s ease;
|
| 42 |
+
box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.1);
|
| 43 |
}
|
| 44 |
</style>
|
| 45 |
</head>
|
| 46 |
+
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-4">
|
| 47 |
+
<div id="chat-container" class="w-full max-w-md bg-white rounded-lg shadow-sm overflow-hidden border border-gray-200">
|
| 48 |
+
<!-- Header -->
|
| 49 |
+
<div class="border-b border-gray-200 p-5 bg-white">
|
| 50 |
+
<div class="flex items-center space-x-3">
|
| 51 |
+
<div class="w-9 h-9 rounded-full bg-blue-50 flex items-center justify-center text-hotel-accent">
|
| 52 |
+
<i class="fas fa-hotel text-sm"></i>
|
| 53 |
+
</div>
|
| 54 |
+
<div>
|
| 55 |
+
<h2 class="font-medium text-gray-900">Hotel Arcane</h2>
|
| 56 |
+
<p class="text-xs text-gray-500">Digital Concierge</p>
|
| 57 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
</div>
|
| 59 |
</div>
|
| 60 |
|
| 61 |
+
<!-- Chat Area -->
|
| 62 |
+
<div class="chat-log h-chat-height p-5 overflow-y-auto bg-white" id="chatLog">
|
| 63 |
+
<div class="flex mb-4 message">
|
| 64 |
+
<div class="w-8 h-8 rounded-full bg-blue-50 flex items-center justify-center text-hotel-accent flex-shrink-0">
|
| 65 |
+
<i class="fas fa-hotel text-xs"></i>
|
|
|
|
| 66 |
</div>
|
| 67 |
+
<div class="ml-3 max-w-[85%]">
|
| 68 |
+
<div class="bg-gray-50 px-4 py-3 rounded-lg">
|
| 69 |
+
<p class="text-sm text-gray-800 leading-relaxed">Welcome to Hotel Arcane. I'm here to assist with your stay. How may I help you today?</p>
|
| 70 |
+
</div>
|
| 71 |
+
<p class="text-xs text-gray-400 mt-1">Today at <span id="current-time"></span></p>
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
</div>
|
| 75 |
|
| 76 |
<!-- Input Area -->
|
| 77 |
+
<div class="border-t border-gray-200 p-4 bg-white">
|
| 78 |
+
<div class="flex items-center space-x-3">
|
| 79 |
+
<div class="flex-grow relative">
|
| 80 |
<input
|
| 81 |
type="text"
|
| 82 |
id="userInput"
|
| 83 |
+
placeholder="Message Hotel Arcane..."
|
| 84 |
+
class="w-full px-4 py-3 rounded-lg border border-gray-200 focus:outline-none focus:border-hotel-accent input-focus text-sm text-gray-800 placeholder-gray-400"
|
| 85 |
onkeypress="if(event.keyCode==13) sendMessage()"
|
| 86 |
>
|
|
|
|
|
|
|
|
|
|
| 87 |
</div>
|
| 88 |
<button
|
| 89 |
onclick="sendMessage()"
|
| 90 |
+
class="w-10 h-10 bg-hotel-accent text-white rounded-lg flex items-center justify-center hover:bg-blue-700 transition"
|
| 91 |
+
aria-label="Send message"
|
| 92 |
>
|
| 93 |
+
<i class="fas fa-paper-plane text-xs"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
</button>
|
| 95 |
</div>
|
| 96 |
</div>
|
| 97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
<script>
|
| 100 |
// Display current time
|
|
|
|
| 110 |
const userInput = document.getElementById('userInput');
|
| 111 |
|
| 112 |
function appendMessage(sender, text) {
|
| 113 |
+
const now = new Date();
|
| 114 |
+
const timeString = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
|
| 115 |
+
|
| 116 |
const messageDiv = document.createElement('div');
|
| 117 |
+
messageDiv.className = `flex mb-4 message`;
|
| 118 |
|
| 119 |
if (sender === 'user') {
|
| 120 |
messageDiv.innerHTML = `
|
| 121 |
+
<div class="ml-auto max-w-[85%]">
|
| 122 |
+
<div class="bg-hotel-accent text-white px-4 py-3 rounded-lg">
|
| 123 |
+
<p class="text-sm leading-relaxed">${text}</p>
|
|
|
|
| 124 |
</div>
|
| 125 |
+
<p class="text-xs text-gray-400 mt-1 text-right">${timeString}</p>
|
| 126 |
</div>
|
| 127 |
`;
|
| 128 |
} else {
|
| 129 |
messageDiv.innerHTML = `
|
| 130 |
+
<div class="w-8 h-8 rounded-full bg-blue-50 flex items-center justify-center text-hotel-accent flex-shrink-0">
|
| 131 |
+
<i class="fas fa-hotel text-xs"></i>
|
| 132 |
</div>
|
| 133 |
+
<div class="ml-3 max-w-[85%]">
|
| 134 |
+
<div class="bg-gray-50 px-4 py-3 rounded-lg">
|
| 135 |
+
<p class="text-sm text-gray-800 leading-relaxed">${text}</p>
|
| 136 |
+
</div>
|
| 137 |
+
<p class="text-xs text-gray-400 mt-1">${timeString}</p>
|
| 138 |
</div>
|
| 139 |
`;
|
| 140 |
}
|
|
|
|
| 143 |
return messageDiv;
|
| 144 |
}
|
| 145 |
|
| 146 |
+
// Enhanced responses for hotel context
|
| 147 |
+
const hotelResponses = {
|
| 148 |
+
greetings: ["Hello! How may I assist you today?", "Welcome back! How can we make your stay better?", "Good day! What can I help you with?"],
|
| 149 |
+
checkIn: ["Would you like help with check-in procedures?", "Our check-in time is at 3:00 PM. Need any assistance?", "I can prepare your check-in details. May I have your name?"],
|
| 150 |
+
amenities: ["We offer spa services, fine dining, and a rooftop pool. What interests you?", "Our amenities include 24/7 room service, fitness center, and valet parking.", "Would you like recommendations for our on-site facilities?"],
|
| 151 |
+
dining: ["Our restaurant serves breakfast from 7-11AM and dinner from 6-10PM. Shall I make a reservation?", "We have both room service and our signature restaurant. Which would you prefer?", "Our chef's special tonight is pan-seared salmon. Would you like to book a table?"],
|
| 152 |
+
checkout: ["Check-out is at 11AM. Would you like to request a late check-out?", "I can arrange your bill and transportation. When are you departing?", "Would you like your receipt emailed or printed?"]
|
| 153 |
+
};
|
|
|
|
|
|
|
| 154 |
|
| 155 |
+
function getRandomResponse(responses) {
|
| 156 |
+
return responses[Math.floor(Math.random() * responses.length)];
|
|
|
|
| 157 |
}
|
| 158 |
|
| 159 |
function sendMessage() {
|
|
|
|
| 163 |
appendMessage('user', userText);
|
| 164 |
userInput.value = '';
|
| 165 |
|
| 166 |
+
// Simulate typing delay for more natural interaction
|
|
|
|
|
|
|
| 167 |
setTimeout(() => {
|
| 168 |
+
const typingIndicator = appendMessage('hotel', '...');
|
|
|
|
| 169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
setTimeout(() => {
|
| 171 |
+
chatLog.removeChild(typingIndicator);
|
| 172 |
+
|
| 173 |
+
let reply = "";
|
| 174 |
+
const lowerText = userText.toLowerCase();
|
| 175 |
+
|
| 176 |
+
if (lowerText.includes('hello') || lowerText.includes('hi') || lowerText.includes('hey')) {
|
| 177 |
+
reply = getRandomResponse(hotelResponses.greetings);
|
| 178 |
+
}
|
| 179 |
+
else if (lowerText.includes('check in') || lowerText.includes('arrival')) {
|
| 180 |
+
reply = getRandomResponse(hotelResponses.checkIn);
|
| 181 |
+
}
|
| 182 |
+
else if (lowerText.includes('room') || lowerText.includes('available') || lowerText.includes('book')) {
|
| 183 |
+
reply = "We have Deluxe, Executive, and Suite rooms available. Would you like details on a specific type?";
|
| 184 |
+
}
|
| 185 |
+
else if (lowerText.includes('amen') || lowerText.includes('facility') || lowerText.includes('service')) {
|
| 186 |
+
reply = getRandomResponse(hotelResponses.amenities);
|
| 187 |
+
}
|
| 188 |
+
else if (lowerText.includes('food') || lowerText.includes('dinner') || lowerText.includes('breakfast')) {
|
| 189 |
+
reply = getRandomResponse(hotelResponses.dining);
|
| 190 |
+
}
|
| 191 |
+
else if (lowerText.includes('check out') || lowerText.includes('depart') || lowerText.includes('leave')) {
|
| 192 |
+
reply = getRandomResponse(hotelResponses.checkout);
|
| 193 |
+
}
|
| 194 |
+
else if (lowerText.includes('thank') || lowerText.includes('thanks')) {
|
| 195 |
+
reply = "You're most welcome! Is there anything else I can assist you with?";
|
| 196 |
+
}
|
| 197 |
+
else {
|
| 198 |
+
reply = "I'd be happy to assist with your request at Hotel Arcane. Could you share more details?";
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
appendMessage('hotel', reply);
|
| 202 |
+
}, 800 + Math.random() * 500); // Random delay for more natural feel
|
| 203 |
+
}, 300);
|
| 204 |
}
|
| 205 |
+
|
| 206 |
+
// Focus input on load
|
| 207 |
+
window.onload = function() {
|
| 208 |
+
userInput.focus();
|
| 209 |
+
};
|
| 210 |
</script>
|
| 211 |
<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=chipmonktalent/rimi" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 212 |
</html>
|