Spaces:
Running
on
Zero
Running
on
Zero
cutechicken
commited on
Commit
โข
0b0ac38
1
Parent(s):
6e53936
Update app.py
Browse files
app.py
CHANGED
@@ -352,20 +352,28 @@ body {
|
|
352 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
353 |
}
|
354 |
|
355 |
-
|
356 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
/* ๋ฉ์์ง ์คํ์ผ */
|
@@ -385,67 +393,6 @@ body {
|
|
385 |
transform: translateZ(5px);
|
386 |
}
|
387 |
|
388 |
-
/* ์ค์ ํจ๋ */
|
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),
|
396 |
-
0 3px 3px var(--shadow-color);
|
397 |
-
transform: translateZ(0);
|
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%;
|
427 |
-
height: 8px;
|
428 |
-
border-radius: 5px;
|
429 |
-
background: #ddd;
|
430 |
-
outline: none;
|
431 |
-
margin: 35px 0;
|
432 |
-
}
|
433 |
-
|
434 |
-
.slider::-webkit-slider-thumb {
|
435 |
-
-webkit-appearance: none;
|
436 |
-
appearance: none;
|
437 |
-
width: 20px;
|
438 |
-
height: 20px;
|
439 |
-
border-radius: 50%;
|
440 |
-
background: var(--primary-color);
|
441 |
-
cursor: pointer;
|
442 |
-
transition: all 0.3s ease;
|
443 |
-
}
|
444 |
-
|
445 |
-
.slider::-webkit-slider-thumb:hover {
|
446 |
-
transform: scale(1.2);
|
447 |
-
}
|
448 |
-
|
449 |
.chat-container {
|
450 |
height: 600px !important;
|
451 |
margin-bottom: 10px;
|
@@ -464,6 +411,12 @@ body {
|
|
464 |
border-radius: 8px !important;
|
465 |
font-size: 1.1em !important;
|
466 |
padding: 10px 15px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
}
|
468 |
|
469 |
.send-button {
|
@@ -471,6 +424,12 @@ body {
|
|
471 |
min-width: 70px !important;
|
472 |
font-size: 1.1em !important;
|
473 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
"""
|
475 |
|
476 |
# UI ๊ตฌ์ฑ
|
@@ -491,8 +450,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
491 |
scale=1,
|
492 |
container=True,
|
493 |
interactive=True,
|
494 |
-
show_label=False
|
495 |
-
label=""
|
496 |
)
|
497 |
|
498 |
with gr.Column(scale=4):
|
@@ -511,53 +469,30 @@ with gr.Blocks(css=CSS) as demo:
|
|
511 |
scale=1
|
512 |
)
|
513 |
|
514 |
-
with gr.Accordion("๐ฎ ๊ณ ๊ธ ์ค์ ", open=False
|
515 |
with gr.Row():
|
516 |
with gr.Column(scale=1):
|
517 |
-
gr.
|
518 |
-
|
519 |
-
|
|
|
|
|
|
|
|
|
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.
|
537 |
-
|
538 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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=[
|
|
|
352 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
353 |
}
|
354 |
|
355 |
+
.file-upload-icon:hover {
|
356 |
+
transform: translateY(-2px);
|
357 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
358 |
+
}
|
359 |
+
|
360 |
+
/* ํ์ผ ์
๋ก๋ ๋ฒํผ ๋ด๋ถ ์์ ์คํ์ผ๋ง */
|
361 |
+
.file-upload-icon > .wrap {
|
362 |
+
display: flex !important;
|
363 |
+
align-items: center;
|
364 |
+
justify-content: center;
|
365 |
+
width: 100%;
|
366 |
+
height: 100%;
|
367 |
+
}
|
368 |
+
|
369 |
+
.file-upload-icon > .wrap > p {
|
370 |
display: none !important;
|
371 |
}
|
372 |
|
373 |
+
.file-upload-icon > .wrap::before {
|
374 |
content: "๐";
|
|
|
375 |
font-size: 2em;
|
376 |
+
display: block;
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
|
379 |
/* ๋ฉ์์ง ์คํ์ผ */
|
|
|
393 |
transform: translateZ(5px);
|
394 |
}
|
395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
.chat-container {
|
397 |
height: 600px !important;
|
398 |
margin-bottom: 10px;
|
|
|
411 |
border-radius: 8px !important;
|
412 |
font-size: 1.1em !important;
|
413 |
padding: 10px 15px !important;
|
414 |
+
display: flex !important;
|
415 |
+
align-items: flex-start !important; /* ํ
์คํธ ์
๋ ฅ ์์น๋ฅผ ์๋ก ์กฐ์ */
|
416 |
+
}
|
417 |
+
|
418 |
+
.input-textbox textarea {
|
419 |
+
padding-top: 5px !important; /* ํ
์คํธ ์๋จ ์ฌ๋ฐฑ ์กฐ์ */
|
420 |
}
|
421 |
|
422 |
.send-button {
|
|
|
424 |
min-width: 70px !important;
|
425 |
font-size: 1.1em !important;
|
426 |
}
|
427 |
+
|
428 |
+
/* ์ค์ ํจ๋ ๊ธฐ๋ณธ ์คํ์ผ */
|
429 |
+
.settings-panel {
|
430 |
+
padding: 20px;
|
431 |
+
margin-top: 20px;
|
432 |
+
}
|
433 |
"""
|
434 |
|
435 |
# UI ๊ตฌ์ฑ
|
|
|
450 |
scale=1,
|
451 |
container=True,
|
452 |
interactive=True,
|
453 |
+
show_label=False
|
|
|
454 |
)
|
455 |
|
456 |
with gr.Column(scale=4):
|
|
|
469 |
scale=1
|
470 |
)
|
471 |
|
472 |
+
with gr.Accordion("๐ฎ ๊ณ ๊ธ ์ค์ ", open=False):
|
473 |
with gr.Row():
|
474 |
with gr.Column(scale=1):
|
475 |
+
temperature = gr.Slider(
|
476 |
+
minimum=0, maximum=1, step=0.1, value=0.8,
|
477 |
+
label="์ฐฝ์์ฑ ์์ค ๐จ"
|
478 |
+
)
|
479 |
+
max_new_tokens = gr.Slider(
|
480 |
+
minimum=128, maximum=8000, step=1, value=4000,
|
481 |
+
label="์ต๋ ํ ํฐ ์ ๐"
|
482 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
with gr.Column(scale=1):
|
484 |
+
top_p = gr.Slider(
|
485 |
+
minimum=0.0, maximum=1.0, step=0.1, value=0.8,
|
486 |
+
label="๋ค์์ฑ ์กฐ์ ๐ฏ"
|
487 |
+
)
|
488 |
+
top_k = gr.Slider(
|
489 |
+
minimum=1, maximum=20, step=1, value=20,
|
490 |
+
label="์ ํ ๋ฒ์ ๐"
|
491 |
+
)
|
492 |
+
penalty = gr.Slider(
|
493 |
+
minimum=0.0, maximum=2.0, step=0.1, value=1.0,
|
494 |
+
label="๋ฐ๋ณต ์ต์ ๐"
|
495 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
|
497 |
gr.Examples(
|
498 |
examples=[
|