Spaces:
Sleeping
Sleeping
ayush-thakur02
commited on
Commit
•
b3e9d95
1
Parent(s):
91c72af
Create templates/index.html
Browse files- templates/index.html +41 -0
templates/index.html
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Lucy | Reconfigure.in</title>
|
8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
|
10 |
+
</head>
|
11 |
+
|
12 |
+
<body class="bg-gray-100 h-screen flex flex-col">
|
13 |
+
<div class="container mx-auto p-4 flex-grow flex flex-col max-w-2xl h-full">
|
14 |
+
<div class="bg-white rounded-lg shadow-lg overflow-hidden flex flex-col h-full">
|
15 |
+
<div class="bg-blue-600 text-white p-4 flex items-center">
|
16 |
+
<i class="fas fa-robot mr-2"></i>
|
17 |
+
<h1 class="text-xl font-bold"><a href="http://reconfigure.in/" target="_blank">Lucy v1 <span
|
18 |
+
style="font-size: 14px;margin: 0;">[Human Mimic Testing]</span></a></h1>
|
19 |
+
</div>
|
20 |
+
<div id="chat-messages" class="flex-grow overflow-y-auto p-4 space-y-4">
|
21 |
+
<!-- Chat messages will be appended here -->
|
22 |
+
</div>
|
23 |
+
<div class="border-t p-4">
|
24 |
+
<form id="chat-form" class="flex">
|
25 |
+
<input type="text" name="message" id="message-input" placeholder="Type your message..."
|
26 |
+
class="flex-grow p-2 border rounded-l-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
27 |
+
<button type="submit"
|
28 |
+
class="bg-blue-500 text-white p-2 rounded-r-lg hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
29 |
+
<i class="fas fa-paper-plane" style="width: 30px; text-align: center;"></i>
|
30 |
+
</button>
|
31 |
+
</form>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<script>
|
37 |
+
const _0x3fdcba=_0x3b76;(function(_0x3ad9a3,_0x56ef7a){const _0x36e28c=_0x3b76,_0x284d3f=_0x3ad9a3();while(!![]){try{const _0x3bd623=-parseInt(_0x36e28c(0xda))/0x1*(-parseInt(_0x36e28c(0xdb))/0x2)+-parseInt(_0x36e28c(0xd7))/0x3*(-parseInt(_0x36e28c(0xf8))/0x4)+-parseInt(_0x36e28c(0xcf))/0x5+-parseInt(_0x36e28c(0xf2))/0x6*(-parseInt(_0x36e28c(0xec))/0x7)+parseInt(_0x36e28c(0xe8))/0x8+parseInt(_0x36e28c(0xd0))/0x9*(parseInt(_0x36e28c(0xf6))/0xa)+parseInt(_0x36e28c(0xd1))/0xb*(-parseInt(_0x36e28c(0xe5))/0xc);if(_0x3bd623===_0x56ef7a)break;else _0x284d3f['push'](_0x284d3f['shift']());}catch(_0x558334){_0x284d3f['push'](_0x284d3f['shift']());}}}(_0x5082,0xbb164));let conversationHistory='';document[_0x3fdcba(0xd2)](_0x3fdcba(0xde))[_0x3fdcba(0xe0)](_0x3fdcba(0xd3),function(_0x3d5b9c){const _0x337882=_0x3fdcba;_0x3d5b9c[_0x337882(0xf5)]();const _0x542cd8=document['getElementById'](_0x337882(0xf7)),_0xd613d8=_0x542cd8[_0x337882(0xdc)];if(_0xd613d8[_0x337882(0xe1)]()==='')return;addMessageToChat(_0xd613d8,_0x337882(0xcd)),fetch('/chat',{'method':'POST','headers':{'Content-Type':_0x337882(0xd6)},'body':JSON[_0x337882(0xf0)]({'message':_0xd613d8,'history':conversationHistory})})[_0x337882(0xe3)](_0x4af30b=>_0x4af30b['json']())[_0x337882(0xe3)](_0x488679=>{const _0x1cb41b=_0x337882;addMessageToChat(_0x488679['response'],_0x1cb41b(0xe4)),conversationHistory+=_0x1cb41b(0xdd)+_0xd613d8+_0x1cb41b(0xf4)+_0x488679[_0x1cb41b(0xdf)];})[_0x337882(0xee)](_0x4fd2b5=>{const _0x3ba13e=_0x337882;console[_0x3ba13e(0xef)](_0x3ba13e(0xd5),_0x4fd2b5),addMessageToChat('An\x20error\x20occurred.\x20Please\x20try\x20again.',_0x3ba13e(0xeb));}),_0x542cd8[_0x337882(0xdc)]='';});function _0x5082(){const _0x4864b3=['stringify','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>','419028LgIDJO','createElement','</user>\x0a<assistant>','preventDefault','14590lSSqlN','message-input','3559828HuASZP','user','div','6563850krgRIK','2889XUfytS','16093792tFubpc','getElementById','submit','className','Error:','application/json','3VhXYWv','appendChild','scrollHeight','26RxqaBw','3492IlUznQ','value','<user>','chat-form','response','addEventListener','trim','scrollTop','then','bot','12PJKcdi','justify-end','text-white','10961920AtUtMN','bg-red-500','</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','system','77TtmYrB','innerHTML','catch','error'];_0x5082=function(){return _0x4864b3;};return _0x5082();}function _0x3b76(_0x2c2f3a,_0x3ca753){const _0x508228=_0x5082();return _0x3b76=function(_0x3b7696,_0x47b471){_0x3b7696=_0x3b7696-0xcd;let _0x3f01f2=_0x508228[_0x3b7696];return _0x3f01f2;},_0x3b76(_0x2c2f3a,_0x3ca753);}function addMessageToChat(_0x58ad99,_0x4e09ea){const _0x369f52=_0x3fdcba,_0x572302=document['getElementById']('chat-messages'),_0x2a8865=document[_0x369f52(0xf3)](_0x369f52(0xce));_0x2a8865[_0x369f52(0xd4)]='flex\x20'+(_0x4e09ea==='user'?_0x369f52(0xe6):'justify-start');const _0x2dc73f=_0x4e09ea===_0x369f52(0xcd)?'bg-blue-500':_0x4e09ea===_0x369f52(0xe4)?'bg-gray-300':_0x369f52(0xe9),_0x1217ad=_0x4e09ea==='user'?_0x369f52(0xe7):'text-gray-800';_0x2a8865[_0x369f52(0xed)]='\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22max-w-xs\x20lg:max-w-md\x20px-4\x20py-2\x20rounded-lg\x20'+_0x2dc73f+'\x20'+_0x1217ad+_0x369f52(0xf1)+_0x58ad99+_0x369f52(0xea),_0x572302[_0x369f52(0xd8)](_0x2a8865),_0x572302[_0x369f52(0xe2)]=_0x572302[_0x369f52(0xd9)];}
|
38 |
+
</script>
|
39 |
+
</body>
|
40 |
+
|
41 |
+
</html>
|