Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -341,7 +341,6 @@ body {
|
|
| 341 |
background: linear-gradient(145deg, #64b5f6, #42a5f5);
|
| 342 |
color: white;
|
| 343 |
border-radius: 8px;
|
| 344 |
-
padding: 8px 12px;
|
| 345 |
font-size: 2em;
|
| 346 |
cursor: pointer;
|
| 347 |
display: flex;
|
|
@@ -353,19 +352,20 @@ body {
|
|
| 353 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
| 354 |
}
|
| 355 |
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
}
|
| 360 |
|
| 361 |
-
.file-upload-icon
|
| 362 |
-
|
| 363 |
-
|
|
|
|
| 364 |
}
|
| 365 |
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
}
|
| 370 |
|
| 371 |
/* ๋ฉ์์ง ์คํ์ผ */
|
|
@@ -389,7 +389,7 @@ body {
|
|
| 389 |
.settings-panel {
|
| 390 |
background: var(--card-background);
|
| 391 |
border-radius: 15px;
|
| 392 |
-
padding:
|
| 393 |
margin-top: 20px;
|
| 394 |
box-shadow:
|
| 395 |
0 5px 15px var(--shadow-color),
|
|
@@ -398,15 +398,29 @@ body {
|
|
| 398 |
transition: all 0.3s ease;
|
| 399 |
}
|
| 400 |
|
| 401 |
-
|
| 402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 403 |
}
|
| 404 |
|
| 405 |
-
/* ์ฌ๋ผ์ด๋
|
| 406 |
.slider-container {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
margin: 25px 0;
|
|
|
|
| 408 |
}
|
| 409 |
|
|
|
|
| 410 |
.slider {
|
| 411 |
-webkit-appearance: none;
|
| 412 |
width: 100%;
|
|
@@ -414,7 +428,7 @@ body {
|
|
| 414 |
border-radius: 5px;
|
| 415 |
background: #ddd;
|
| 416 |
outline: none;
|
| 417 |
-
margin:
|
| 418 |
}
|
| 419 |
|
| 420 |
.slider::-webkit-slider-thumb {
|
|
@@ -457,21 +471,6 @@ body {
|
|
| 457 |
min-width: 70px !important;
|
| 458 |
font-size: 1.1em !important;
|
| 459 |
}
|
| 460 |
-
|
| 461 |
-
/* ๊ณ ๊ธ ์ค์ ๋ ์ด๋ธ ์คํ์ผ */
|
| 462 |
-
.settings-label {
|
| 463 |
-
font-size: 1.2em;
|
| 464 |
-
font-weight: 500;
|
| 465 |
-
margin: 20px 0;
|
| 466 |
-
color: var(--text-color);
|
| 467 |
-
}
|
| 468 |
-
|
| 469 |
-
/* ์ฌ๋ผ์ด๋ ๋ ์ด๋ธ ์คํ์ผ */
|
| 470 |
-
.slider-label {
|
| 471 |
-
font-size: 1.1em;
|
| 472 |
-
margin: 15px 0;
|
| 473 |
-
color: var(--text-color);
|
| 474 |
-
}
|
| 475 |
"""
|
| 476 |
|
| 477 |
# UI ๊ตฌ์ฑ
|
|
@@ -492,7 +491,8 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 492 |
scale=1,
|
| 493 |
container=True,
|
| 494 |
interactive=True,
|
| 495 |
-
show_label=False
|
|
|
|
| 496 |
)
|
| 497 |
|
| 498 |
with gr.Column(scale=4):
|
|
@@ -514,39 +514,50 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 514 |
with gr.Accordion("๐ฎ ๊ณ ๊ธ ์ค์ ", open=False, elem_classes="settings-panel"):
|
| 515 |
with gr.Row():
|
| 516 |
with gr.Column(scale=1):
|
| 517 |
-
gr.Markdown(
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
label="์ฐฝ์์ฑ ์์ค ๐จ",
|
| 521 |
-
elem_classes="slider",
|
| 522 |
-
container=True
|
| 523 |
-
)
|
| 524 |
-
max_new_tokens = gr.Slider(
|
| 525 |
-
minimum=128, maximum=8000, step=1, value=4000,
|
| 526 |
-
label="์ต๋ ํ ํฐ ์ ๐",
|
| 527 |
-
elem_classes="slider",
|
| 528 |
-
container=True
|
| 529 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 530 |
with gr.Column(scale=1):
|
| 531 |
-
gr.Markdown(
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
label="๋ค์์ฑ ์กฐ์ ๐ฏ",
|
| 535 |
-
elem_classes="slider",
|
| 536 |
-
container=True
|
| 537 |
-
)
|
| 538 |
-
top_k = gr.Slider(
|
| 539 |
-
minimum=1, maximum=20, step=1, value=20,
|
| 540 |
-
label="์ ํ ๏ฟฝ๏ฟฝ๏ฟฝ์ ๐",
|
| 541 |
-
elem_classes="slider",
|
| 542 |
-
container=True
|
| 543 |
-
)
|
| 544 |
-
penalty = gr.Slider(
|
| 545 |
-
minimum=0.0, maximum=2.0, step=0.1, value=1.0,
|
| 546 |
-
label="๋ฐ๋ณต ์ต์ ๐",
|
| 547 |
-
elem_classes="slider",
|
| 548 |
-
container=True
|
| 549 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 550 |
|
| 551 |
gr.Examples(
|
| 552 |
examples=[
|
|
|
|
| 341 |
background: linear-gradient(145deg, #64b5f6, #42a5f5);
|
| 342 |
color: white;
|
| 343 |
border-radius: 8px;
|
|
|
|
| 344 |
font-size: 2em;
|
| 345 |
cursor: pointer;
|
| 346 |
display: flex;
|
|
|
|
| 352 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
| 353 |
}
|
| 354 |
|
| 355 |
+
/* ํ์ผ ์
๋ก๋ ๊ด๋ จ ๋ชจ๋ ํ
์คํธ ์จ๊ธฐ๊ธฐ */
|
| 356 |
+
.file-upload-icon * {
|
| 357 |
+
display: none !important;
|
| 358 |
}
|
| 359 |
|
| 360 |
+
.file-upload-icon::before {
|
| 361 |
+
content: "๐";
|
| 362 |
+
display: block !important;
|
| 363 |
+
font-size: 2em;
|
| 364 |
}
|
| 365 |
|
| 366 |
+
.file-upload-icon:hover {
|
| 367 |
+
transform: translateY(-2px);
|
| 368 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
| 369 |
}
|
| 370 |
|
| 371 |
/* ๋ฉ์์ง ์คํ์ผ */
|
|
|
|
| 389 |
.settings-panel {
|
| 390 |
background: var(--card-background);
|
| 391 |
border-radius: 15px;
|
| 392 |
+
padding: 40px;
|
| 393 |
margin-top: 20px;
|
| 394 |
box-shadow:
|
| 395 |
0 5px 15px var(--shadow-color),
|
|
|
|
| 398 |
transition: all 0.3s ease;
|
| 399 |
}
|
| 400 |
|
| 401 |
+
/* ์ค์ ์น์
์ ๋ชฉ */
|
| 402 |
+
.settings-section {
|
| 403 |
+
font-size: 1.3em;
|
| 404 |
+
font-weight: 600;
|
| 405 |
+
color: var(--text-color);
|
| 406 |
+
margin: 30px 0;
|
| 407 |
+
padding-bottom: 15px;
|
| 408 |
+
border-bottom: 2px solid var(--primary-color);
|
| 409 |
}
|
| 410 |
|
| 411 |
+
/* ์ฌ๋ผ์ด๋ ์ปจํ
์ด๋ */
|
| 412 |
.slider-container {
|
| 413 |
+
margin: 40px 0;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
/* ์ฌ๋ผ์ด๋ ๋ ์ด๋ธ */
|
| 417 |
+
.slider-label {
|
| 418 |
+
font-size: 1.1em;
|
| 419 |
margin: 25px 0;
|
| 420 |
+
color: var(--text-color);
|
| 421 |
}
|
| 422 |
|
| 423 |
+
/* ์ฌ๋ผ์ด๋ */
|
| 424 |
.slider {
|
| 425 |
-webkit-appearance: none;
|
| 426 |
width: 100%;
|
|
|
|
| 428 |
border-radius: 5px;
|
| 429 |
background: #ddd;
|
| 430 |
outline: none;
|
| 431 |
+
margin: 35px 0;
|
| 432 |
}
|
| 433 |
|
| 434 |
.slider::-webkit-slider-thumb {
|
|
|
|
| 471 |
min-width: 70px !important;
|
| 472 |
font-size: 1.1em !important;
|
| 473 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
"""
|
| 475 |
|
| 476 |
# UI ๊ตฌ์ฑ
|
|
|
|
| 491 |
scale=1,
|
| 492 |
container=True,
|
| 493 |
interactive=True,
|
| 494 |
+
show_label=False,
|
| 495 |
+
label=""
|
| 496 |
)
|
| 497 |
|
| 498 |
with gr.Column(scale=4):
|
|
|
|
| 514 |
with gr.Accordion("๐ฎ ๊ณ ๊ธ ์ค์ ", open=False, elem_classes="settings-panel"):
|
| 515 |
with gr.Row():
|
| 516 |
with gr.Column(scale=1):
|
| 517 |
+
gr.Markdown(
|
| 518 |
+
"### ์์ฑ ๋งค๊ฐ๋ณ์",
|
| 519 |
+
elem_classes="settings-section"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 520 |
)
|
| 521 |
+
with gr.Column(elem_classes="slider-container"):
|
| 522 |
+
temperature = gr.Slider(
|
| 523 |
+
minimum=0, maximum=1, step=0.1, value=0.8,
|
| 524 |
+
label="์ฐฝ์์ฑ ์์ค ๐จ",
|
| 525 |
+
elem_classes="slider",
|
| 526 |
+
container=True
|
| 527 |
+
)
|
| 528 |
+
with gr.Column(elem_classes="slider-container"):
|
| 529 |
+
max_new_tokens = gr.Slider(
|
| 530 |
+
minimum=128, maximum=8000, step=1, value=4000,
|
| 531 |
+
label="์ต๋ ํ ํฐ ์ ๐",
|
| 532 |
+
elem_classes="slider",
|
| 533 |
+
container=True
|
| 534 |
+
)
|
| 535 |
with gr.Column(scale=1):
|
| 536 |
+
gr.Markdown(
|
| 537 |
+
"### ์ ์ด ๋งค๊ฐ๋ณ์",
|
| 538 |
+
elem_classes="settings-section"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 539 |
)
|
| 540 |
+
with gr.Column(elem_classes="slider-container"):
|
| 541 |
+
top_p = gr.Slider(
|
| 542 |
+
minimum=0.0, maximum=1.0, step=0.1, value=0.8,
|
| 543 |
+
label="๋ค์์ฑ ์กฐ์ ๐ฏ",
|
| 544 |
+
elem_classes="slider",
|
| 545 |
+
container=True
|
| 546 |
+
)
|
| 547 |
+
with gr.Column(elem_classes="slider-container"):
|
| 548 |
+
top_k = gr.Slider(
|
| 549 |
+
minimum=1, maximum=20, step=1, value=20,
|
| 550 |
+
label="์ ํ ๋ฒ์ ๐",
|
| 551 |
+
elem_classes="slider",
|
| 552 |
+
container=True
|
| 553 |
+
)
|
| 554 |
+
with gr.Column(elem_classes="slider-container"):
|
| 555 |
+
penalty = gr.Slider(
|
| 556 |
+
minimum=0.0, maximum=2.0, step=0.1, value=1.0,
|
| 557 |
+
label="๋ฐ๋ณต ์ต์ ๐",
|
| 558 |
+
elem_classes="slider",
|
| 559 |
+
container=True
|
| 560 |
+
)
|
| 561 |
|
| 562 |
gr.Examples(
|
| 563 |
examples=[
|