Spaces:
Sleeping
Sleeping
Update app_gradio.py
Browse files- app_gradio.py +60 -83
app_gradio.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
|
|
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
from megumin_agent.chat import chat_once
|
|
@@ -7,6 +9,10 @@ from megumin_agent.chat import create_chat_services
|
|
| 7 |
|
| 8 |
|
| 9 |
SERVICES = create_chat_services()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
MEGUMIN_SVG = """
|
| 12 |
<svg viewBox="0 0 420 560" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Megumin inspired illustration">
|
|
@@ -52,15 +58,10 @@ MEGUMIN_SVG = """
|
|
| 52 |
|
| 53 |
CUSTOM_CSS = """
|
| 54 |
:root {
|
| 55 |
-
--megumin-bg: #17070f;
|
| 56 |
-
--megumin-wine: #5d0f1f;
|
| 57 |
-
--megumin-gold: #f2b64a;
|
| 58 |
-
--megumin-cream: #fff1de;
|
| 59 |
--megumin-panel: rgba(255, 244, 232, 0.12);
|
| 60 |
--megumin-panel-strong: rgba(255, 244, 232, 0.18);
|
| 61 |
--megumin-line: rgba(255, 216, 169, 0.22);
|
| 62 |
-
--megumin-text: #
|
| 63 |
-
--megumin-muted: rgba(255, 245, 234, 0.78);
|
| 64 |
--megumin-shadow: 0 24px 80px rgba(7, 1, 4, 0.42);
|
| 65 |
}
|
| 66 |
|
|
@@ -117,10 +118,6 @@ body, .gradio-container {
|
|
| 117 |
z-index: 1;
|
| 118 |
}
|
| 119 |
|
| 120 |
-
.shell > .gr-block {
|
| 121 |
-
background: transparent !important;
|
| 122 |
-
}
|
| 123 |
-
|
| 124 |
.layout {
|
| 125 |
align-items: stretch;
|
| 126 |
gap: 20px;
|
|
@@ -135,11 +132,7 @@ body, .gradio-container {
|
|
| 135 |
overflow: hidden;
|
| 136 |
}
|
| 137 |
|
| 138 |
-
.profile-panel, .visual-panel {
|
| 139 |
-
min-height: 780px;
|
| 140 |
-
}
|
| 141 |
-
|
| 142 |
-
.chat-panel {
|
| 143 |
min-height: 780px;
|
| 144 |
}
|
| 145 |
|
|
@@ -151,7 +144,7 @@ body, .gradio-container {
|
|
| 151 |
font-size: 0.82rem;
|
| 152 |
letter-spacing: 0.14em;
|
| 153 |
text-transform: uppercase;
|
| 154 |
-
color: rgba(255, 217, 174, 0.
|
| 155 |
margin-bottom: 10px;
|
| 156 |
}
|
| 157 |
|
|
@@ -160,17 +153,26 @@ body, .gradio-container {
|
|
| 160 |
line-height: 1.1;
|
| 161 |
font-weight: 800;
|
| 162 |
margin: 0;
|
| 163 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
}
|
| 165 |
|
| 166 |
.panel-copy {
|
| 167 |
margin: 12px 0 0;
|
| 168 |
font-size: 0.98rem;
|
| 169 |
-
line-height: 1.
|
| 170 |
-
color: var(--megumin-muted);
|
| 171 |
}
|
| 172 |
|
| 173 |
-
.persona-box,
|
| 174 |
.example-box,
|
| 175 |
.visual-note {
|
| 176 |
margin: 18px 24px 0;
|
|
@@ -184,18 +186,14 @@ body, .gradio-container {
|
|
| 184 |
margin: 0 0 10px;
|
| 185 |
font-size: 0.95rem;
|
| 186 |
font-weight: 700;
|
| 187 |
-
color: #ffd7a0;
|
| 188 |
}
|
| 189 |
|
| 190 |
-
.persona-box ul,
|
| 191 |
.example-box ul {
|
| 192 |
margin: 0;
|
| 193 |
padding-left: 1.1rem;
|
| 194 |
-
color: var(--megumin-muted);
|
| 195 |
line-height: 1.7;
|
| 196 |
}
|
| 197 |
|
| 198 |
-
.persona-box li,
|
| 199 |
.example-box li {
|
| 200 |
margin: 0 0 0.45rem;
|
| 201 |
}
|
|
@@ -212,13 +210,7 @@ body, .gradio-container {
|
|
| 212 |
margin: 0;
|
| 213 |
font-size: 2rem;
|
| 214 |
font-weight: 800;
|
| 215 |
-
color:
|
| 216 |
-
}
|
| 217 |
-
|
| 218 |
-
.chat-header p {
|
| 219 |
-
margin: 8px 0 0;
|
| 220 |
-
line-height: 1.6;
|
| 221 |
-
color: var(--megumin-muted);
|
| 222 |
}
|
| 223 |
|
| 224 |
.status-pill {
|
|
@@ -228,7 +220,6 @@ body, .gradio-container {
|
|
| 228 |
padding: 10px 14px;
|
| 229 |
border-radius: 999px;
|
| 230 |
background: rgba(255, 209, 143, 0.12);
|
| 231 |
-
color: #ffe5bc;
|
| 232 |
font-size: 0.85rem;
|
| 233 |
border: 1px solid rgba(255, 213, 157, 0.18);
|
| 234 |
}
|
|
@@ -245,11 +236,6 @@ body, .gradio-container {
|
|
| 245 |
padding: 0 20px 14px;
|
| 246 |
}
|
| 247 |
|
| 248 |
-
.chatbot-wrap .bubble-wrap,
|
| 249 |
-
.chatbot-wrap .message-row {
|
| 250 |
-
font-size: 0.98rem;
|
| 251 |
-
}
|
| 252 |
-
|
| 253 |
.chatbot-wrap .message,
|
| 254 |
.chatbot-wrap .bubble {
|
| 255 |
backdrop-filter: blur(10px);
|
|
@@ -275,14 +261,9 @@ body, .gradio-container {
|
|
| 275 |
padding: 0 20px 20px;
|
| 276 |
}
|
| 277 |
|
| 278 |
-
.input-zone .gr-textbox,
|
| 279 |
-
.input-zone .gr-button {
|
| 280 |
-
min-height: 52px;
|
| 281 |
-
}
|
| 282 |
-
|
| 283 |
.input-zone textarea,
|
| 284 |
.input-zone input {
|
| 285 |
-
color:
|
| 286 |
}
|
| 287 |
|
| 288 |
.input-zone .gr-textbox,
|
|
@@ -292,6 +273,15 @@ body, .gradio-container {
|
|
| 292 |
border-color: rgba(255, 226, 186, 0.16) !important;
|
| 293 |
}
|
| 294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
.input-zone .gr-button-primary {
|
| 296 |
background: linear-gradient(135deg, #f19f35 0%, #d84f34 100%) !important;
|
| 297 |
color: #fff8ef !important;
|
|
@@ -299,11 +289,7 @@ body, .gradio-container {
|
|
| 299 |
}
|
| 300 |
|
| 301 |
.input-zone .gr-button-secondary {
|
| 302 |
-
color:
|
| 303 |
-
}
|
| 304 |
-
|
| 305 |
-
.visual-panel {
|
| 306 |
-
position: relative;
|
| 307 |
}
|
| 308 |
|
| 309 |
.visual-frame {
|
|
@@ -323,26 +309,22 @@ body, .gradio-container {
|
|
| 323 |
border: 1px solid rgba(255, 226, 186, 0.16);
|
| 324 |
}
|
| 325 |
|
| 326 |
-
.
|
|
|
|
| 327 |
width: 100%;
|
| 328 |
max-width: 360px;
|
| 329 |
margin: 0 auto;
|
| 330 |
display: block;
|
| 331 |
}
|
| 332 |
|
| 333 |
-
.
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
}
|
| 338 |
|
| 339 |
-
.
|
| 340 |
-
display:
|
| 341 |
-
margin-top: 10px;
|
| 342 |
-
color: rgba(255, 232, 197, 0.72);
|
| 343 |
-
font-size: 0.82rem;
|
| 344 |
-
letter-spacing: 0.08em;
|
| 345 |
-
text-transform: uppercase;
|
| 346 |
}
|
| 347 |
|
| 348 |
@media (max-width: 1200px) {
|
|
@@ -367,27 +349,18 @@ PROFILE_HTML = """
|
|
| 367 |
<div class="eyebrow">Character Guide</div>
|
| 368 |
<h2 class="panel-title">๋ฉ๊ตฌ๋ฐ ํ๋กํ</h2>
|
| 369 |
<p class="panel-copy">
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
</p>
|
| 374 |
</div>
|
| 375 |
-
<div class="persona-box">
|
| 376 |
-
<p class="box-title">ํ๋ฅด์๋ ํต์ฌ</p>
|
| 377 |
-
<ul>
|
| 378 |
-
<li>๊ธฐ๋ณธ์ ํ๊ตญ์ด ์กด๋๋ง, 1์ธ์นญ ์ ์ง</li>
|
| 379 |
-
<li>์ฐ๊ทน์ ์ด๊ณ ๋น๋นํ์ง๋ง ์ฝ๊ธฐ ์ฌ์ด ๋ต๋ณ</li>
|
| 380 |
-
<li>๋ณธ์ธ์ ๋ชจ์ํ๋ฉด "์ด์ด, "๋ก ์์ํด ๋ง๋ฐ์์นจ</li>
|
| 381 |
-
<li>์์ ์ค์ ์ ์ฌ์ค RAG, ๋งํฌ๋ ํ๋ฅด์๋ RAG๋ก ๋ณด๊ฐ</li>
|
| 382 |
-
</ul>
|
| 383 |
-
</div>
|
| 384 |
<div class="example-box">
|
| 385 |
<p class="box-title">์์ ์ง๋ฌธ</p>
|
| 386 |
<ul>
|
| 387 |
<li>๋ฉ๊ตฌ๋ฐ, ์นด์ฆ๋ง ์จ๋ฅผ ์ด๋ป๊ฒ ์๊ฐํ์ญ๋๊น?</li>
|
| 388 |
<li>ํญ๋ ฌ๋ง๋ฒ์ ๊ฐ๋ฅด์ณ ์ค ์ฌ๋์ ๋๊ตฌ์ธ๊ฐ์?</li>
|
| 389 |
<li>์์ฟ ์์ ์ธ์ดํฌ๋ฆฌ๋ ๋ธ๋ ์ดํฌ ์คํ ์ด ๋ฌด์์ธ์ง ์ค๋ช
ํด ์ฃผ์ธ์.</li>
|
| 390 |
-
<li>ํ๋ง์กฑ๋ค์ด ์๊ธฐ์๊ฐ๋ฅผ ํ ๋ฒ
|
| 391 |
<li>๋ฉ๊ตฌ๋ฐ์ด๋ผ๋ ์ด๋ฆ์ด ์๊ธฐ๋ค๊ณ ํ๋ฉด ์ด๋ป๊ฒ ๋ฐ์์น์๊ฒ ์ต๋๊น?</li>
|
| 392 |
</ul>
|
| 393 |
</div>
|
|
@@ -400,13 +373,19 @@ VISUAL_HTML = f"""
|
|
| 400 |
<div>
|
| 401 |
<div class="eyebrow">Explosion Archive</div>
|
| 402 |
<div class="visual-card">
|
| 403 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
</div>
|
| 405 |
<div class="visual-note">
|
| 406 |
<p class="box-title">์ด ํ์ด์ง์ ๋ถ์๊ธฐ</p>
|
| 407 |
<p class="panel-copy">
|
| 408 |
-
์ด๋์ด ์ ๋
๋น
|
| 409 |
-
์ค์์ ๋ฐํฌ๋ช
์ฑํ
ํจ๋์ ์ค์ ๋ก ๋ฉ๊ตฌ๋ฐ๊ณผ ๋ง์ฃผ
|
| 410 |
</p>
|
| 411 |
</div>
|
| 412 |
</div>
|
|
@@ -460,11 +439,8 @@ with gr.Blocks(title="Megumin RAG Chat", fill_height=True) as demo:
|
|
| 460 |
<div class="chat-header">
|
| 461 |
<div>
|
| 462 |
<div class="eyebrow">Megumin Dialogue Chamber</div>
|
| 463 |
-
<h1>๋ฉ๊ตฌ๋ฐ
|
| 464 |
-
<p>
|
| 465 |
-
๋ฉ๊ตฌ๋ฐ ํ๋ฅด์๋์ ์ฝ๋
ธ์ค๋ฐ ์ค์ RAG๋ฅผ ํจ๊ป ํ์ฉํด,
|
| 466 |
-
๋ฉ๊ตฌ๋ฐ ๋ณธ์ธ์ฒ๋ผ ๋ตํ๋ ๋ํ ์ธ์
์
๋๋ค.
|
| 467 |
-
</p>
|
| 468 |
</div>
|
| 469 |
<div class="status-pill">
|
| 470 |
<span class="status-dot"></span>
|
|
@@ -491,8 +467,9 @@ with gr.Blocks(title="Megumin RAG Chat", fill_height=True) as demo:
|
|
| 491 |
max_lines=4,
|
| 492 |
scale=8,
|
| 493 |
)
|
| 494 |
-
|
| 495 |
-
|
|
|
|
| 496 |
with gr.Column(scale=4, min_width=320):
|
| 497 |
gr.HTML(VISUAL_HTML)
|
| 498 |
|
|
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
import gradio as gr
|
| 6 |
|
| 7 |
from megumin_agent.chat import chat_once
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
SERVICES = create_chat_services()
|
| 12 |
+
MEGUMIN_IMAGE_URL = os.getenv(
|
| 13 |
+
"MEGUMIN_IMAGE_URL",
|
| 14 |
+
"https://huggingface.co/datasets/Junhoee/megumin-chat/resolve/main/๋ฉ๊ตฌ๋ฐ์ฌ์ง.png",
|
| 15 |
+
)
|
| 16 |
|
| 17 |
MEGUMIN_SVG = """
|
| 18 |
<svg viewBox="0 0 420 560" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Megumin inspired illustration">
|
|
|
|
| 58 |
|
| 59 |
CUSTOM_CSS = """
|
| 60 |
:root {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
--megumin-panel: rgba(255, 244, 232, 0.12);
|
| 62 |
--megumin-panel-strong: rgba(255, 244, 232, 0.18);
|
| 63 |
--megumin-line: rgba(255, 216, 169, 0.22);
|
| 64 |
+
--megumin-text: #fff8ef;
|
|
|
|
| 65 |
--megumin-shadow: 0 24px 80px rgba(7, 1, 4, 0.42);
|
| 66 |
}
|
| 67 |
|
|
|
|
| 118 |
z-index: 1;
|
| 119 |
}
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
.layout {
|
| 122 |
align-items: stretch;
|
| 123 |
gap: 20px;
|
|
|
|
| 132 |
overflow: hidden;
|
| 133 |
}
|
| 134 |
|
| 135 |
+
.profile-panel, .visual-panel, .chat-panel {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
min-height: 780px;
|
| 137 |
}
|
| 138 |
|
|
|
|
| 144 |
font-size: 0.82rem;
|
| 145 |
letter-spacing: 0.14em;
|
| 146 |
text-transform: uppercase;
|
| 147 |
+
color: rgba(255, 217, 174, 0.82);
|
| 148 |
margin-bottom: 10px;
|
| 149 |
}
|
| 150 |
|
|
|
|
| 153 |
line-height: 1.1;
|
| 154 |
font-weight: 800;
|
| 155 |
margin: 0;
|
| 156 |
+
color: #ffffff;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.panel-copy,
|
| 160 |
+
.box-title,
|
| 161 |
+
.example-box li,
|
| 162 |
+
.visual-note p,
|
| 163 |
+
.chat-header p,
|
| 164 |
+
.status-pill,
|
| 165 |
+
.quote,
|
| 166 |
+
.quote small {
|
| 167 |
+
color: #ffffff !important;
|
| 168 |
}
|
| 169 |
|
| 170 |
.panel-copy {
|
| 171 |
margin: 12px 0 0;
|
| 172 |
font-size: 0.98rem;
|
| 173 |
+
line-height: 1.75;
|
|
|
|
| 174 |
}
|
| 175 |
|
|
|
|
| 176 |
.example-box,
|
| 177 |
.visual-note {
|
| 178 |
margin: 18px 24px 0;
|
|
|
|
| 186 |
margin: 0 0 10px;
|
| 187 |
font-size: 0.95rem;
|
| 188 |
font-weight: 700;
|
|
|
|
| 189 |
}
|
| 190 |
|
|
|
|
| 191 |
.example-box ul {
|
| 192 |
margin: 0;
|
| 193 |
padding-left: 1.1rem;
|
|
|
|
| 194 |
line-height: 1.7;
|
| 195 |
}
|
| 196 |
|
|
|
|
| 197 |
.example-box li {
|
| 198 |
margin: 0 0 0.45rem;
|
| 199 |
}
|
|
|
|
| 210 |
margin: 0;
|
| 211 |
font-size: 2rem;
|
| 212 |
font-weight: 800;
|
| 213 |
+
color: #ffffff;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
}
|
| 215 |
|
| 216 |
.status-pill {
|
|
|
|
| 220 |
padding: 10px 14px;
|
| 221 |
border-radius: 999px;
|
| 222 |
background: rgba(255, 209, 143, 0.12);
|
|
|
|
| 223 |
font-size: 0.85rem;
|
| 224 |
border: 1px solid rgba(255, 213, 157, 0.18);
|
| 225 |
}
|
|
|
|
| 236 |
padding: 0 20px 14px;
|
| 237 |
}
|
| 238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
.chatbot-wrap .message,
|
| 240 |
.chatbot-wrap .bubble {
|
| 241 |
backdrop-filter: blur(10px);
|
|
|
|
| 261 |
padding: 0 20px 20px;
|
| 262 |
}
|
| 263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
.input-zone textarea,
|
| 265 |
.input-zone input {
|
| 266 |
+
color: #ffffff !important;
|
| 267 |
}
|
| 268 |
|
| 269 |
.input-zone .gr-textbox,
|
|
|
|
| 273 |
border-color: rgba(255, 226, 186, 0.16) !important;
|
| 274 |
}
|
| 275 |
|
| 276 |
+
.input-actions {
|
| 277 |
+
gap: 12px;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.input-actions .gr-button {
|
| 281 |
+
width: 100%;
|
| 282 |
+
min-height: 52px;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
.input-zone .gr-button-primary {
|
| 286 |
background: linear-gradient(135deg, #f19f35 0%, #d84f34 100%) !important;
|
| 287 |
color: #fff8ef !important;
|
|
|
|
| 289 |
}
|
| 290 |
|
| 291 |
.input-zone .gr-button-secondary {
|
| 292 |
+
color: #fff8ef !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
}
|
| 294 |
|
| 295 |
.visual-frame {
|
|
|
|
| 309 |
border: 1px solid rgba(255, 226, 186, 0.16);
|
| 310 |
}
|
| 311 |
|
| 312 |
+
.portrait-image,
|
| 313 |
+
.portrait-fallback {
|
| 314 |
width: 100%;
|
| 315 |
max-width: 360px;
|
| 316 |
margin: 0 auto;
|
| 317 |
display: block;
|
| 318 |
}
|
| 319 |
|
| 320 |
+
.portrait-image {
|
| 321 |
+
border-radius: 24px;
|
| 322 |
+
object-fit: cover;
|
| 323 |
+
box-shadow: 0 22px 40px rgba(0, 0, 0, 0.24);
|
| 324 |
}
|
| 325 |
|
| 326 |
+
.portrait-fallback {
|
| 327 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
}
|
| 329 |
|
| 330 |
@media (max-width: 1200px) {
|
|
|
|
| 349 |
<div class="eyebrow">Character Guide</div>
|
| 350 |
<h2 class="panel-title">๋ฉ๊ตฌ๋ฐ ํ๋กํ</h2>
|
| 351 |
<p class="panel-copy">
|
| 352 |
+
์ด ๋ฉ์ง ์ธ๊ณ์ ์ถ๋ณต์!์ ๋ฑ์ฅ์ธ๋ฌผ๋ก, ํญ๋ ฌ๋ง๋ฒ๋ง์ ๊ณ ์งํ๋ ํ๋ง์กฑ ์ํฌ ์์ ๋์
๋๋ค.
|
| 353 |
+
์์กด์ฌ ๊ฐํ๊ณ ํ์ธ ๋์น๋ ๋งํฌ๋ฅผ ์ฆ๊ธฐ์ง๋ง, ๋๋ฃ๋ค์๊ฒ๋ ์์ธ๋ก ์ง์ฌ์ ๋ณด์ด๋ ๋ฉด๋ ์์ต๋๋ค.
|
| 354 |
+
์ด ์ฑ๋ด์ ๋ฉ๊ตฌ๋ฐ์ ๋งํฌ์ ๊ฐ์ ์ ์ ์ ์งํ๋ฉด์ ์์ ์ค์ ๊น์ง ํจ๊ป ์ฐธ๊ณ ํด ๋ตํฉ๋๋ค.
|
| 355 |
</p>
|
| 356 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
<div class="example-box">
|
| 358 |
<p class="box-title">์์ ์ง๋ฌธ</p>
|
| 359 |
<ul>
|
| 360 |
<li>๋ฉ๊ตฌ๋ฐ, ์นด์ฆ๋ง ์จ๋ฅผ ์ด๋ป๊ฒ ์๊ฐํ์ญ๋๊น?</li>
|
| 361 |
<li>ํญ๋ ฌ๋ง๋ฒ์ ๊ฐ๋ฅด์ณ ์ค ์ฌ๋์ ๋๊ตฌ์ธ๊ฐ์?</li>
|
| 362 |
<li>์์ฟ ์์ ์ธ์ดํฌ๋ฆฌ๋ ๋ธ๋ ์ดํฌ ์คํ ์ด ๋ฌด์์ธ์ง ์ค๋ช
ํด ์ฃผ์ธ์.</li>
|
| 363 |
+
<li>ํ๋ง์กฑ๋ค์ด ์๊ธฐ์๊ฐ๋ฅผ ํ ๋ฒ ๋ค๋ ค์ฃผ์๊ฒ ์ต๋๊น?</li>
|
| 364 |
<li>๋ฉ๊ตฌ๋ฐ์ด๋ผ๋ ์ด๋ฆ์ด ์๊ธฐ๋ค๊ณ ํ๋ฉด ์ด๋ป๊ฒ ๋ฐ์์น์๊ฒ ์ต๋๊น?</li>
|
| 365 |
</ul>
|
| 366 |
</div>
|
|
|
|
| 373 |
<div>
|
| 374 |
<div class="eyebrow">Explosion Archive</div>
|
| 375 |
<div class="visual-card">
|
| 376 |
+
<img
|
| 377 |
+
class="portrait-image"
|
| 378 |
+
src="{MEGUMIN_IMAGE_URL}"
|
| 379 |
+
alt="Megumin"
|
| 380 |
+
onerror="this.style.display='none'; this.nextElementSibling.style.display='block';"
|
| 381 |
+
/>
|
| 382 |
+
<div class="portrait-fallback">{MEGUMIN_SVG}</div>
|
| 383 |
</div>
|
| 384 |
<div class="visual-note">
|
| 385 |
<p class="box-title">์ด ํ์ด์ง์ ๋ถ์๊ธฐ</p>
|
| 386 |
<p class="panel-copy">
|
| 387 |
+
์ด๋์ด ์ ๋
๋น๊ณผ ํญ๋ ฌ๋ง๋ฒ์ ์๊ด์ด ๊ฐ๋๋ ๋ฌด๋๋ก ๊ตฌ์ฑํ์ต๋๋ค.
|
| 388 |
+
์ค์์ ๋ฐํฌ๋ช
์ฑํ
ํจ๋์ ์ค์ ๋ก ๋ฉ๊ตฌ๋ฐ๊ณผ ๋ง์ฃผ ์์ ์ด์ผ๊ธฐ๋ฅผ ์ฃผ๊ณ ๋ฐ๋ ๋๋์ ์ฃผ๋๋ก ์ค๊ณํ์ต๋๋ค.
|
| 389 |
</p>
|
| 390 |
</div>
|
| 391 |
</div>
|
|
|
|
| 439 |
<div class="chat-header">
|
| 440 |
<div>
|
| 441 |
<div class="eyebrow">Megumin Dialogue Chamber</div>
|
| 442 |
+
<h1>๋ฉ๊ตฌ๋ฐ Chatbot</h1>
|
| 443 |
+
<p>๋ฉ๊ตฌ๋ฐ๊ณผ ์์ ๋กญ๊ฒ ๋ํํด๋ณด์ธ์!</p>
|
|
|
|
|
|
|
|
|
|
| 444 |
</div>
|
| 445 |
<div class="status-pill">
|
| 446 |
<span class="status-dot"></span>
|
|
|
|
| 467 |
max_lines=4,
|
| 468 |
scale=8,
|
| 469 |
)
|
| 470 |
+
with gr.Column(scale=1, elem_classes=["input-actions"]):
|
| 471 |
+
send_button = gr.Button("Send", variant="primary")
|
| 472 |
+
clear_button = gr.Button("Clear", variant="secondary")
|
| 473 |
with gr.Column(scale=4, min_width=320):
|
| 474 |
gr.HTML(VISUAL_HTML)
|
| 475 |
|