-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
175 lines (171 loc) · 5.07 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chatbots Say the Darndest Things</title>
<style>
body, html {
height: 100%;
margin: 0;
font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
background: #FAF9F6;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.chat-container {
width: 500px;
height: 600px;
/* background: white; */
/* overflow-y: auto; */
padding: 60px;
/* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
display: flex;
flex-direction: column;
justify-content: flex-start;
overflow: hidden;
}
.messages {
flex: 1;
overflow-y: auto;
}
.messages::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
@media screen and (max-width: 600px) {
.chat-container {
padding: 30px;
padding-top: 0px;
margin-top: -30px;
height: 95%;
}
}
.message {
margin-top: 30px;
}
.text {
/* padding: 10px; */
border-radius: 5px;
line-height: 1.4;
background-color: transparent;
}
.label {
/* padding: 0px 10px ; */
font-weight: bold;
margin-bottom: 5px;
}
#spinButton-container {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 100%;
max-width: 500px;
padding: 0 20px;
}
#spinButton {
padding: 10px 20px;
background-color: #FAF9F6;
/* color: white; */
border: none;
border-radius: 5px;
cursor: pointer;
/* width: 150px; */
align-self: center;
font-size: 60px;
display:none;
}
.spinner {
animation: spin 1s linear;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#clickMeMessage {
font-size: 20px;
font-style:italic;
color: black;
}
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(209, 207, 207, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.modal-content {
background: #E6E6FA; /* Fun blue background */
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
border: double 10px black; /* Double-lined border */
font-size: 40px;
}
#startButton {
padding: 10px 20px;
background-color: #746596; /* Darker blue background */
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
font-size: 20px;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#startButton:hover {
background-color: #7B68EE; /* Even darker blue on hover */
}
#devil {
font-size: 30px;
vertical-align: middle;
line-height: 1.5;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
padding: 10px 0;
background-color: #f9f9f9; /* Matches the body background */
font-size: 9px;
}
</style>
</head>
<body>
<div id="initialModal" class="modal">
<div class="modal-content">
<p>Chatbots Say The Darndest Things</p>
<button id="startButton" onclick="startChat();">I'm ready <span id="devil" >😈</span></button>
</div>
</div>
<div class="chat-container">
<div class="messages" id="chatContainer">
<!-- Messages will appear here -->
</div>
<button id="spinButton" onclick="startSpinning(); hideClickMeMessage();">
🤖
<span id="clickMeMessage">👆Click Me!</span>
</button>
</div>
</div>
<script src="load_conversations.js"></script>
</body>
<footer style="text-align: center; margin-top: 20px;">
<p>
🤗
Data from
<a href="https://huggingface.co/datasets/Anthropic/hh-rlhf" target="_blank">
https://huggingface.co/datasets/Anthropic/hh-rlhf
</a>
</p>
</footer>
</html>