Spaces:
Sleeping
Sleeping
File size: 8,570 Bytes
9186425 d443c93 1c2b5d2 18ed09e 1c2b5d2 18ed09e 28e8f05 18ed09e 9186425 ef91b66 9186425 ef91b66 9186425 ef91b66 7c42784 ef91b66 9186425 1db9ce6 9186425 18ed09e 1c8e01a 9186425 1c8e01a 18ed09e 9186425 18ed09e 1c8e01a 9186425 1c8e01a 18ed09e 9186425 7c42784 5f36649 0acb4f5 9186425 18ed09e 1c8e01a 18ed09e 9186425 762e19e 1c2b5d2 762e19e 9186425 1db9ce6 9186425 1db9ce6 9186425 1db9ce6 9186425 1db9ce6 64bc65f 1db9ce6 9186425 0e91c63 9186425 5f36649 9186425 5f36649 c06298e 5f36649 c06298e 5f36649 |
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 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
hr.append-display {
margin: 8px 0;
border: none;
height: 1px;
border-top-width: 0;
background-image: linear-gradient(to right, rgba(50,50,50, 0.1), rgba(150, 150, 150, 0.8), rgba(50,50,50, 0.1));
}
.source-a {
font-size: 0.8em;
max-width: 100%;
margin: 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
/* background-color: #dddddd88; */
border-radius: 1.5rem;
padding: 0.2em;
}
.source-a a {
display: inline-block;
background-color: #aaaaaa50;
border-radius: 1rem;
padding: 0.5em;
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
min-width: 20%;
white-space: nowrap;
margin: 0.2rem 0.1rem;
text-decoration: none !important;
flex: 1;
transition: flex 0.5s;
}
.source-a a:hover {
background-color: #aaaaaa20;
flex: 2;
}
/* 川虎助理 */
.agent-prefix {
font-size: smaller;
opacity: 0.6;
padding: 6px 0 4px;
}
.agent-prefix::before {
content: '🐯';
filter: grayscale();
padding: 0 4px;
}
/* 阻止generating时的border */
#chuanhu-chatbot > .wrap {
border: none !important;
}
#chatbot-input-row {
align-items: end;
gap: 6px;
}
#chatbot-input-row .gradio-html {
min-width: 0;
max-width: 42px;
width: 42px;
}
#chatbot-input-tb-row {
gap: 0;
justify-content: end;
border-radius: 21px;
background: var(--chatbot-input-background-color);
box-shadow: var(--shadow-md);
}
#user-input-tb {
padding: 0 !important;
/* border: 1px solid rgba(167, 167, 167, 0.5) !important; */
/* border-radius: 21px !important; */
}
#user-input-tb textarea {
/* max-height: 110px; */
background: transparent;
}
#user-input-tb .wrap {
background: none !important;
border-radius: 21px !important;
}
/* 亮色(默认) */
#chuanhu-chatbot {
background-color: var(--chatbot-background-color-light) !important;
color: var(--chatbot-color-light) !important;
}
[data-testid = "bot"] {
background-color: var(--message-bot-background-color-light) !important;
}
[data-testid = "user"] {
background-color: var(--message-user-background-color-light) !important;
}
/* 暗色 */
.dark #chuanhu-chatbot {
background-color: var(--chatbot-background-color-dark) !important;
color: var(--chatbot-color-dark) !important;
}
.dark [data-testid = "bot"] {
background-color: var(--message-bot-background-color-dark) !important;
}
.dark [data-testid = "user"] {
background-color: var(--message-user-background-color-dark) !important;
}
/* 对话气泡 */
.message {
border-radius: var(--radius-xl) !important;
border: none;
padding: var(--spacing-xl) !important;
font-size: var(--text-md) !important;
line-height: var(--line-md) !important;
min-height: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
min-width: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
}
[data-testid = "bot"] {
max-width: calc(85% - 40px);
border-bottom-left-radius: 0 !important;
}
[data-testid = "user"] {
max-width: calc(85% - 40px);
width: auto !important;
border-bottom-right-radius: 0 !important;
}
.message-row {
align-self: unset !important;
}
.message-row.user-row {
justify-content: flex-end;
}
/* .message-row.has-message-btn-row{
padding-bottom: 19px !important;
} */
/* 屏幕宽度大于等于500px的设备 */
/* update on 2023.4.8: 高度的细致调整已写入JavaScript */
@media screen and (min-width: 500px) {
/* #chuanhu-chatbot {
height: calc(100*var(--vh) - 200px);
}
#chuanhu-chatbot>.wrapper>.wrap {
max-height: calc(100*var(--vh) - 200px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
} */
}
/* 屏幕宽度小于500px的设备 */
@media screen and (max-width: 499px) {
/* #chuanhu-chatbot {
height: calc(100*var(--vh) - 140px);
}
#chuanhu-chatbot>.wrapper>.wrap {
max-height: calc(100*var(--vh) - 140px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
} */
[data-testid = "bot"] {
max-width: calc(100% - 84px) !important;
}
[data-testid = "user"] {
max-width: calc(100% - 84px) !important;
}
#app-title {
transform: scale(0.95);
transform-origin: left center;
}
#app-title h1{
letter-spacing: -1px; font-size: 22px;
}
}
#chuanhu-chatbot {
height: calc(100*var(--vh) - 65px) !important;
border-radius: 0;
}
#chuanhu-chatbot>.wrapper>.wrap {
overflow-x: hidden;
display: flex;
width: 100%;
flex-direction: column;
padding-inline: 20px;
padding-top: 72px;
padding-bottom: 180px;
}
#chuanhu-chatbot>.wrapper>.wrap .message-wrap {
align-self: center;
width: 100%;
max-width: 1024px;
}
.message.user p {
white-space: pre-wrap;
}
.message .user-message {
display: block;
padding: 0 !important;
white-space: pre-wrap;
}
.message .md-message p {
margin-top: 0.6em !important;
margin-bottom: 0.6em !important;
}
.message .md-message p:first-child { margin-top: 0 !important; }
.message .md-message p:last-of-type { margin-bottom: 0 !important; }
.message .md-message {
display: block;
padding: 0 !important;
}
.message .raw-message p {
margin:0 !important;
}
.message .raw-message {
display: block;
padding: 0 !important;
white-space: pre-wrap;
}
.message .hideM {
display: none;
}
/* custom buttons */
.chuanhu-btn {
border-radius: 5px;
/* background-color: #E6E6E6 !important; */
color: rgba(120, 120, 120, 0.64) !important;
padding: 4px !important;
cursor: pointer !important;
transition: color .2s ease, background-color .2s ease;
}
.chuanhu-btn:hover {
background-color: rgba(167, 167, 167, 0.25) !important;
color: unset !important;
}
.chuanhu-btn:active {
background-color: rgba(167, 167, 167, 0.5) !important;
}
.chuanhu-btn:focus {
outline: none;
}
.message-btn-column {
position: absolute;
right: -23px;
bottom: 0;
display: flex;
flex-direction: column;
align-content: end;
gap: 2px;
}
.message-btn-row {
/* background: red; */
width: 100%;
height: 19px;
position: absolute;
top: calc(100% + 2px);
left: 0;
display: flex;
justify-content: space-between;
}
.message-btn-row-leading, .message-btn-row-trailing {
display: inline-flex;
gap: 4px;
}
.message-btn-row button {
font-size: 10px;
align-self: center;
align-items: center;
flex-wrap: nowrap;
white-space: nowrap;
display: inline-flex;
flex-direction: row;
gap: 4px;
padding-block: 2px !important;
}
.like-latest-btn, .dislike-latest-btn {
display: none !important;
/* filter: grayscale(); */
}
.is-xmchat .like-latest-btn, .is-xmchat .dislike-latest-btn {
display: inline-flex !important;
}
/* .copy-bot-btn {
top: 18px; */
/* bottom: 0;
}
.toggle-md-btn {
top: 0; */
/* bottom: 20px;
} */
/* note: this is deprecated */
.copy-code-btn {
position: relative;
float: right;
font-size: 1em;
cursor: pointer;
}
/* note: the button below disabled in chatbot.py */
.message div.icon-button > button[title="copy"] {
display: none;
}
/* disable share button and other buttons in hugging face spaces */
#chuanhu-chatbot > .wrapper > .icon-button {
display: none !important;
}
/* history message */
.wrapper>.wrap>.history-message {
padding-bottom: 10px !important;
}
.history-message {
/* padding: 0 !important; */
opacity: 80%;
display: flex;
flex-direction: column;
}
.history-message>.history-message {
padding: 0 !important;
}
.history-message>.message-wrap {
padding: 0 !important;
margin-bottom: 16px;
}
.history-message>.message {
margin-bottom: 16px;
}
.wrapper>.wrap>.history-message::after {
content: "";
display: block;
height: 2px;
background-color: var(--body-text-color-subdued);
margin-bottom: 10px;
margin-top: -10px;
clear: both;
}
.wrapper>.wrap>.history-message>:last-child::after {
content: "仅供查看";
display: block;
text-align: center;
color: var(--body-text-color-subdued);
font-size: 0.8em;
}
/* #chuanhu-chatbot {
transition: height 0.3s ease;
note: find it better without transition animation...;
} */
img.avatar-image {
border-radius: 5px !important;
}
.avatar-container {
width: 32px !important;
height: 32px !important;
background-color: transparent;
background-size: cover;
}
|