cutechicken commited on
Commit
c9a0841
β€’
1 Parent(s): 6d46b35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -52
app.py CHANGED
@@ -337,20 +337,30 @@ body {
337
  }
338
 
339
  /* 파일 μ—…λ‘œλ“œ λ²„νŠΌ */
340
- .file-upload-button {
341
  background: linear-gradient(145deg, #64b5f6, #42a5f5);
342
  color: white;
343
- border: none;
344
- border-radius: 10px;
345
- padding: 8px 15px;
346
- margin-right: 10px;
347
  cursor: pointer;
348
- transform: translateZ(0);
 
 
 
 
349
  transition: all 0.3s ease;
 
350
  }
351
 
352
- .file-upload-button:hover {
353
- transform: translateZ(5px) translateY(-2px);
 
 
 
 
 
 
354
  }
355
 
356
  /* λ©”μ‹œμ§€ μŠ€νƒ€μΌ */
@@ -374,13 +384,14 @@ body {
374
  .settings-panel {
375
  background: var(--card-background);
376
  border-radius: 15px;
377
- padding: 15px;
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: 10px 0;
393
  }
394
 
395
  .slider {
396
  -webkit-appearance: none;
397
  width: 100%;
398
- height: 5px;
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: 15px;
408
- height: 15px;
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: 50px !important; /* 전솑 λ²„νŠΌ 높이 증가 */
461
  min-width: 70px !important;
462
  font-size: 1.1em !important;
463
  }
464
 
465
- /* 파일 μ—…λ‘œλ“œ λ²„νŠΌ μ»¨ν…Œμ΄λ„ˆ */
466
- .file-upload-container {
467
- display: flex;
468
- align-items: center;
469
- justify-content: center;
470
- height: 50px;
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(