Spaces:
Runtime error
Runtime error
Commit
ยท
f9f2d2e
1
Parent(s):
c6c9a50
Update app.py
Browse files
app.py
CHANGED
|
@@ -328,23 +328,133 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
|
|
| 328 |
##################################################
|
| 329 |
# ์์๋ค (๊ธฐ์กด)
|
| 330 |
##################################################
|
|
|
|
|
|
|
|
|
|
| 331 |
examples = [
|
| 332 |
[
|
| 333 |
{
|
| 334 |
-
"text": "
|
| 335 |
-
"files": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
}
|
| 337 |
],
|
| 338 |
[
|
| 339 |
{
|
| 340 |
-
"text": "
|
| 341 |
-
"files": ["assets/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
}
|
| 343 |
],
|
| 344 |
-
# ...์๋ ์์๋ค ์ ์ง...
|
| 345 |
]
|
| 346 |
|
| 347 |
|
|
|
|
| 348 |
demo = gr.ChatInterface(
|
| 349 |
fn=run,
|
| 350 |
type="messages",
|
|
|
|
| 328 |
##################################################
|
| 329 |
# ์์๋ค (๊ธฐ์กด)
|
| 330 |
##################################################
|
| 331 |
+
##################################################
|
| 332 |
+
# ์์๋ค (ํ๊ธํ ๋ฒ์ )
|
| 333 |
+
##################################################
|
| 334 |
examples = [
|
| 335 |
[
|
| 336 |
{
|
| 337 |
+
"text": "10์ผ ๋์ ์ผ๋ณธ์ ๋จธ๋ฌด๋ฅด๋ฉด์ ๋์ฟ, ๊ตํ , ์ค์ฌ์นด๋ฅผ ๋ฐฉ๋ฌธํ๋ ค๊ณ ํฉ๋๋ค. ๊ฐ ๋์๋ณ ๊ด๊ด์ง ์๋ฅผ ๊ณ ๋ คํด ๋ฉฐ์น ์ฉ ํ ๋นํ๋ฉด ์ข์์ง, ๊ทธ๋ฆฌ๊ณ ๋์ค๊ตํต ์ด์ฉ์ ๋ํ ์ถ์ฒ์ ํด์ฃผ์ธ์.",
|
| 338 |
+
"files": [],
|
| 339 |
+
}
|
| 340 |
+
],
|
| 341 |
+
[
|
| 342 |
+
{
|
| 343 |
+
"text": "๋์ผํ ๋ง๋ ๊ทธ๋ํ๋ฅผ ๊ทธ๋ฆฌ๋ matplotlib ์ฝ๋๋ฅผ ์์ฑํด์ฃผ์ธ์.",
|
| 344 |
+
"files": ["assets/additional-examples/barchart.png"],
|
| 345 |
+
}
|
| 346 |
+
],
|
| 347 |
+
[
|
| 348 |
+
{
|
| 349 |
+
"text": "์ด ์์์์ ์ด์ํ ์ ์ด ๋ฌด์์ธ๊ฐ์?",
|
| 350 |
+
"files": ["assets/additional-examples/tmp.mp4"],
|
| 351 |
+
}
|
| 352 |
+
],
|
| 353 |
+
[
|
| 354 |
+
{
|
| 355 |
+
"text": "์ด๋ฏธ ์ด ์์์ ๋ฅผ <image> ๊ฐ์ง๊ณ ์๊ณ , ์ด ์ ํ <image>์ ์๋ก ์ฌ๋ ค ํฉ๋๋ค. ํจ๊ป ์ญ์ทจํ ๋ ์ฃผ์ํด์ผ ํ ์ ์ด ์์๊น์?",
|
| 356 |
+
"files": ["assets/additional-examples/pill1.png", "assets/additional-examples/pill2.png"],
|
| 357 |
+
}
|
| 358 |
+
],
|
| 359 |
+
[
|
| 360 |
+
{
|
| 361 |
+
"text": "์ด๋ฏธ์ง์ ์๊ฐ์ ์์์์ ์๊ฐ์ ๋ฐ์ ์๋ฅผ ์์ฑํด์ฃผ์ธ์.",
|
| 362 |
+
"files": ["assets/sample-images/06-1.png", "assets/sample-images/06-2.png"],
|
| 363 |
+
}
|
| 364 |
+
],
|
| 365 |
+
[
|
| 366 |
+
{
|
| 367 |
+
"text": "์ด๋ฏธ์ง์ ์๊ฐ์ ์์๋ฅผ ํ ๋๋ก ์งง์ ์
๊ณก์ ์๊ณกํด์ฃผ์ธ์.",
|
| 368 |
+
"files": [
|
| 369 |
+
"assets/sample-images/07-1.png",
|
| 370 |
+
"assets/sample-images/07-2.png",
|
| 371 |
+
"assets/sample-images/07-3.png",
|
| 372 |
+
"assets/sample-images/07-4.png",
|
| 373 |
+
],
|
| 374 |
+
}
|
| 375 |
+
],
|
| 376 |
+
[
|
| 377 |
+
{
|
| 378 |
+
"text": "์ด ์ง์์ ๋ฌด์จ ์ผ์ด ์์์์ง ์งง์ ์ด์ผ๊ธฐ๋ฅผ ์ง์ด๋ณด์ธ์.",
|
| 379 |
+
"files": ["assets/sample-images/08.png"],
|
| 380 |
+
}
|
| 381 |
+
],
|
| 382 |
+
[
|
| 383 |
+
{
|
| 384 |
+
"text": "์ด๋ฏธ์ง๋ค์ ์์๋ฅผ ๋ฐํ์ผ๋ก ์งง์ ์ด์ผ๊ธฐ๋ฅผ ๋ง๋ค์ด ์ฃผ์ธ์.",
|
| 385 |
+
"files": [
|
| 386 |
+
"assets/sample-images/09-1.png",
|
| 387 |
+
"assets/sample-images/09-2.png",
|
| 388 |
+
"assets/sample-images/09-3.png",
|
| 389 |
+
"assets/sample-images/09-4.png",
|
| 390 |
+
"assets/sample-images/09-5.png",
|
| 391 |
+
],
|
| 392 |
+
}
|
| 393 |
+
],
|
| 394 |
+
[
|
| 395 |
+
{
|
| 396 |
+
"text": "์ด ์ธ๊ณ์์ ์ด๊ณ ์์ ์๋ฌผ๋ค์ ์์ํด์ ๋ฌ์ฌํด์ฃผ์ธ์.",
|
| 397 |
+
"files": ["assets/sample-images/10.png"],
|
| 398 |
}
|
| 399 |
],
|
| 400 |
[
|
| 401 |
{
|
| 402 |
+
"text": "์ด๋ฏธ์ง์ ์ ํ ํ
์คํธ๋ฅผ ์ฝ์ด์ฃผ์ธ์.",
|
| 403 |
+
"files": ["assets/additional-examples/1.png"],
|
| 404 |
+
}
|
| 405 |
+
],
|
| 406 |
+
[
|
| 407 |
+
{
|
| 408 |
+
"text": "์ด ํฐ์ผ์ ์ธ์ ๋ฐ๊ธ๋ ๊ฒ์ด๊ณ , ๊ฐ๊ฒฉ์ ์ผ๋ง์ธ๊ฐ์?",
|
| 409 |
+
"files": ["assets/additional-examples/2.png"],
|
| 410 |
+
}
|
| 411 |
+
],
|
| 412 |
+
[
|
| 413 |
+
{
|
| 414 |
+
"text": "์ด๋ฏธ์ง์ ์๋ ํ
์คํธ๋ฅผ ๊ทธ๋๋ก ์ฝ์ด์ ๋งํฌ๋ค์ด ํํ๋ก ์ ์ด์ฃผ์ธ์.",
|
| 415 |
+
"files": ["assets/additional-examples/3.png"],
|
| 416 |
+
}
|
| 417 |
+
],
|
| 418 |
+
[
|
| 419 |
+
{
|
| 420 |
+
"text": "์ด ์ ๋ถ์ ํ์ด์ฃผ์ธ์.",
|
| 421 |
+
"files": ["assets/additional-examples/4.png"],
|
| 422 |
+
}
|
| 423 |
+
],
|
| 424 |
+
[
|
| 425 |
+
{
|
| 426 |
+
"text": "์ด ์ด๋ฏธ์ง๋ฅผ ๊ฐ๋จํ ์บก์
์ผ๋ก ์ค๋ช
ํด์ฃผ์ธ์.",
|
| 427 |
+
"files": ["assets/sample-images/01.png"],
|
| 428 |
+
}
|
| 429 |
+
],
|
| 430 |
+
[
|
| 431 |
+
{
|
| 432 |
+
"text": "์ด ํ์งํ์๋ ๋ฌด์จ ๋ฌธ๊ตฌ๊ฐ ์ ํ ์๋์?",
|
| 433 |
+
"files": ["assets/sample-images/02.png"],
|
| 434 |
+
}
|
| 435 |
+
],
|
| 436 |
+
[
|
| 437 |
+
{
|
| 438 |
+
"text": "๋ ์ด๋ฏธ์ง๋ฅผ ๋น๊ตํด์ ๊ณตํต์ ๊ณผ ์ฐจ์ด์ ์ ๋งํด์ฃผ์ธ์.",
|
| 439 |
+
"files": ["assets/sample-images/03.png"],
|
| 440 |
+
}
|
| 441 |
+
],
|
| 442 |
+
[
|
| 443 |
+
{
|
| 444 |
+
"text": "์ด๋ฏธ์ง์ ๋ณด์ด๋ ๋ชจ๋ ์ฌ๋ฌผ๊ณผ ๊ทธ ์์์ ๋์ดํด์ฃผ์ธ์.",
|
| 445 |
+
"files": ["assets/sample-images/04.png"],
|
| 446 |
+
}
|
| 447 |
+
],
|
| 448 |
+
[
|
| 449 |
+
{
|
| 450 |
+
"text": "์ฅ๋ฉด์ ๋ถ์๊ธฐ๋ฅผ ๋ฌ์ฌํด์ฃผ์ธ์.",
|
| 451 |
+
"files": ["assets/sample-images/05.png"],
|
| 452 |
}
|
| 453 |
],
|
|
|
|
| 454 |
]
|
| 455 |
|
| 456 |
|
| 457 |
+
|
| 458 |
demo = gr.ChatInterface(
|
| 459 |
fn=run,
|
| 460 |
type="messages",
|