Spaces:
Running
on
Zero
Running
on
Zero
cutechicken
commited on
Commit
β’
c9a0841
1
Parent(s):
6d46b35
Update app.py
Browse files
app.py
CHANGED
@@ -337,20 +337,30 @@ body {
|
|
337 |
}
|
338 |
|
339 |
/* νμΌ μ
λ‘λ λ²νΌ */
|
340 |
-
.file-upload-
|
341 |
background: linear-gradient(145deg, #64b5f6, #42a5f5);
|
342 |
color: white;
|
343 |
-
border:
|
344 |
-
|
345 |
-
|
346 |
-
margin-right: 10px;
|
347 |
cursor: pointer;
|
348 |
-
|
|
|
|
|
|
|
|
|
349 |
transition: all 0.3s ease;
|
|
|
350 |
}
|
351 |
|
352 |
-
.file-upload-
|
353 |
-
transform:
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
}
|
355 |
|
356 |
/* λ©μμ§ μ€νμΌ */
|
@@ -374,13 +384,14 @@ body {
|
|
374 |
.settings-panel {
|
375 |
background: var(--card-background);
|
376 |
border-radius: 15px;
|
377 |
-
padding:
|
378 |
margin-top: 20px;
|
379 |
box-shadow:
|
380 |
0 5px 15px var(--shadow-color),
|
381 |
0 3px 3px var(--shadow-color);
|
382 |
transform: translateZ(0);
|
383 |
transition: all 0.3s ease;
|
|
|
384 |
}
|
385 |
|
386 |
.settings-panel:hover {
|
@@ -389,23 +400,24 @@ body {
|
|
389 |
|
390 |
/* μ¬λΌμ΄λ μ€νμΌ */
|
391 |
.slider-container {
|
392 |
-
margin:
|
393 |
}
|
394 |
|
395 |
.slider {
|
396 |
-webkit-appearance: none;
|
397 |
width: 100%;
|
398 |
-
height:
|
399 |
border-radius: 5px;
|
400 |
background: #ddd;
|
401 |
outline: none;
|
|
|
402 |
}
|
403 |
|
404 |
.slider::-webkit-slider-thumb {
|
405 |
-webkit-appearance: none;
|
406 |
appearance: none;
|
407 |
-
width:
|
408 |
-
height:
|
409 |
border-radius: 50%;
|
410 |
background: var(--primary-color);
|
411 |
cursor: pointer;
|
@@ -417,67 +429,46 @@ body {
|
|
417 |
}
|
418 |
|
419 |
.chat-container {
|
420 |
-
height: 600px !important;
|
421 |
margin-bottom: 10px;
|
422 |
}
|
423 |
|
424 |
.input-container {
|
425 |
-
height: 70px !important;
|
426 |
display: flex;
|
427 |
align-items: center;
|
428 |
gap: 10px;
|
429 |
margin-top: 5px;
|
430 |
}
|
431 |
|
432 |
-
.file-upload-icon {
|
433 |
-
background: linear-gradient(145deg, #64b5f6, #42a5f5);
|
434 |
-
color: white;
|
435 |
-
border-radius: 8px;
|
436 |
-
padding: 8px 12px;
|
437 |
-
font-size: 1.2em; /* μμ΄μ½ ν¬κΈ° μ½κ° μ¦κ° */
|
438 |
-
cursor: pointer;
|
439 |
-
display: flex;
|
440 |
-
align-items: center;
|
441 |
-
justify-content: center;
|
442 |
-
height: 50px; /* λμ΄ μ¦κ° */
|
443 |
-
width: 50px; /* λλΉ μ€μ */
|
444 |
-
transition: all 0.3s ease;
|
445 |
-
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
446 |
-
}
|
447 |
-
|
448 |
-
.file-upload-icon:hover {
|
449 |
-
transform: translateY(-2px);
|
450 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
451 |
-
}
|
452 |
-
|
453 |
.input-textbox {
|
454 |
-
height: 70px !important;
|
455 |
border-radius: 8px !important;
|
456 |
-
font-size: 1.1em !important;
|
|
|
457 |
}
|
458 |
|
459 |
.send-button {
|
460 |
-
height:
|
461 |
min-width: 70px !important;
|
462 |
font-size: 1.1em !important;
|
463 |
}
|
464 |
|
465 |
-
/*
|
466 |
-
.
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
}
|
472 |
"""
|
473 |
|
474 |
-
|
475 |
# UI ꡬμ±
|
476 |
with gr.Blocks(css=CSS) as demo:
|
477 |
with gr.Column():
|
478 |
chatbot = gr.Chatbot(
|
479 |
value=[],
|
480 |
-
height=600,
|
481 |
label="GiniGEN AI Assistant",
|
482 |
elem_classes="chat-container"
|
483 |
)
|
@@ -515,28 +506,33 @@ with gr.Blocks(css=CSS) as demo:
|
|
515 |
temperature = gr.Slider(
|
516 |
minimum=0, maximum=1, step=0.1, value=0.8,
|
517 |
label="μ°½μμ± μμ€ π¨",
|
518 |
-
elem_classes="slider"
|
|
|
519 |
)
|
520 |
max_new_tokens = gr.Slider(
|
521 |
minimum=128, maximum=8000, step=1, value=4000,
|
522 |
label="μ΅λ ν ν° μ π",
|
523 |
-
elem_classes="slider"
|
|
|
524 |
)
|
525 |
with gr.Column(scale=1):
|
526 |
top_p = gr.Slider(
|
527 |
minimum=0.0, maximum=1.0, step=0.1, value=0.8,
|
528 |
label="λ€μμ± οΏ½οΏ½οΏ½μ π―",
|
529 |
-
elem_classes="slider"
|
|
|
530 |
)
|
531 |
top_k = gr.Slider(
|
532 |
minimum=1, maximum=20, step=1, value=20,
|
533 |
label="μ ν λ²μ π",
|
534 |
-
elem_classes="slider"
|
|
|
535 |
)
|
536 |
penalty = gr.Slider(
|
537 |
minimum=0.0, maximum=2.0, step=0.1, value=1.0,
|
538 |
label="λ°λ³΅ μ΅μ π",
|
539 |
-
elem_classes="slider"
|
|
|
540 |
)
|
541 |
|
542 |
gr.Examples(
|
|
|
337 |
}
|
338 |
|
339 |
/* νμΌ μ
λ‘λ λ²νΌ */
|
340 |
+
.file-upload-icon {
|
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;
|
348 |
+
align-items: center;
|
349 |
+
justify-content: center;
|
350 |
+
height: 70px; /* ν둬ννΈ λ°μ€μ λμΌν λμ΄ */
|
351 |
+
width: 70px; /* μ μ¬κ°ν νν μ μ§ */
|
352 |
transition: all 0.3s ease;
|
353 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
354 |
}
|
355 |
|
356 |
+
.file-upload-icon:hover {
|
357 |
+
transform: translateY(-2px);
|
358 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
359 |
+
}
|
360 |
+
|
361 |
+
.file-upload-icon svg {
|
362 |
+
width: 35px;
|
363 |
+
height: 35px;
|
364 |
}
|
365 |
|
366 |
/* λ©μμ§ μ€νμΌ */
|
|
|
384 |
.settings-panel {
|
385 |
background: var(--card-background);
|
386 |
border-radius: 15px;
|
387 |
+
padding: 20px;
|
388 |
margin-top: 20px;
|
389 |
box-shadow:
|
390 |
0 5px 15px var(--shadow-color),
|
391 |
0 3px 3px var(--shadow-color);
|
392 |
transform: translateZ(0);
|
393 |
transition: all 0.3s ease;
|
394 |
+
min-height: 200px; /* μ΅μ λμ΄ μ€μ */
|
395 |
}
|
396 |
|
397 |
.settings-panel:hover {
|
|
|
400 |
|
401 |
/* μ¬λΌμ΄λ μ€νμΌ */
|
402 |
.slider-container {
|
403 |
+
margin: 15px 0; /* μ¬λ°± μ¦κ° */
|
404 |
}
|
405 |
|
406 |
.slider {
|
407 |
-webkit-appearance: none;
|
408 |
width: 100%;
|
409 |
+
height: 8px; /* μ¬λΌμ΄λ λμ΄ μ¦κ° */
|
410 |
border-radius: 5px;
|
411 |
background: #ddd;
|
412 |
outline: none;
|
413 |
+
margin: 15px 0; /* μ¬λ°± μ¦κ° */
|
414 |
}
|
415 |
|
416 |
.slider::-webkit-slider-thumb {
|
417 |
-webkit-appearance: none;
|
418 |
appearance: none;
|
419 |
+
width: 20px; /* μ¬λΌμ΄λ μΈ ν¬κΈ° μ¦κ° */
|
420 |
+
height: 20px;
|
421 |
border-radius: 50%;
|
422 |
background: var(--primary-color);
|
423 |
cursor: pointer;
|
|
|
429 |
}
|
430 |
|
431 |
.chat-container {
|
432 |
+
height: 600px !important;
|
433 |
margin-bottom: 10px;
|
434 |
}
|
435 |
|
436 |
.input-container {
|
437 |
+
height: 70px !important;
|
438 |
display: flex;
|
439 |
align-items: center;
|
440 |
gap: 10px;
|
441 |
margin-top: 5px;
|
442 |
}
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
.input-textbox {
|
445 |
+
height: 70px !important;
|
446 |
border-radius: 8px !important;
|
447 |
+
font-size: 1.1em !important;
|
448 |
+
padding: 10px 15px !important;
|
449 |
}
|
450 |
|
451 |
.send-button {
|
452 |
+
height: 70px !important; /* ν둬ννΈ λ°μ€μ λμΌν λμ΄ */
|
453 |
min-width: 70px !important;
|
454 |
font-size: 1.1em !important;
|
455 |
}
|
456 |
|
457 |
+
/* κ³ κΈ μ€μ λ μ΄λΈ μ€νμΌ */
|
458 |
+
.settings-label {
|
459 |
+
font-size: 1.1em;
|
460 |
+
font-weight: 500;
|
461 |
+
margin: 10px 0;
|
462 |
+
color: var(--text-color);
|
463 |
}
|
464 |
"""
|
465 |
|
|
|
466 |
# UI ꡬμ±
|
467 |
with gr.Blocks(css=CSS) as demo:
|
468 |
with gr.Column():
|
469 |
chatbot = gr.Chatbot(
|
470 |
value=[],
|
471 |
+
height=600,
|
472 |
label="GiniGEN AI Assistant",
|
473 |
elem_classes="chat-container"
|
474 |
)
|
|
|
506 |
temperature = gr.Slider(
|
507 |
minimum=0, maximum=1, step=0.1, value=0.8,
|
508 |
label="μ°½μμ± μμ€ π¨",
|
509 |
+
elem_classes="slider",
|
510 |
+
container=True
|
511 |
)
|
512 |
max_new_tokens = gr.Slider(
|
513 |
minimum=128, maximum=8000, step=1, value=4000,
|
514 |
label="μ΅λ ν ν° μ π",
|
515 |
+
elem_classes="slider",
|
516 |
+
container=True
|
517 |
)
|
518 |
with gr.Column(scale=1):
|
519 |
top_p = gr.Slider(
|
520 |
minimum=0.0, maximum=1.0, step=0.1, value=0.8,
|
521 |
label="λ€μμ± οΏ½οΏ½οΏ½μ π―",
|
522 |
+
elem_classes="slider",
|
523 |
+
container=True
|
524 |
)
|
525 |
top_k = gr.Slider(
|
526 |
minimum=1, maximum=20, step=1, value=20,
|
527 |
label="μ ν λ²μ π",
|
528 |
+
elem_classes="slider",
|
529 |
+
container=True
|
530 |
)
|
531 |
penalty = gr.Slider(
|
532 |
minimum=0.0, maximum=2.0, step=0.1, value=1.0,
|
533 |
label="λ°λ³΅ μ΅μ π",
|
534 |
+
elem_classes="slider",
|
535 |
+
container=True
|
536 |
)
|
537 |
|
538 |
gr.Examples(
|