cutechicken commited on
Commit
6d46b35
โ€ข
1 Parent(s): 7f1dbfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -32
app.py CHANGED
@@ -416,14 +416,13 @@ body {
416
  transform: scale(1.2);
417
  }
418
 
419
-
420
  .chat-container {
421
- height: 700px !important; /* ์ฑ„ํŒ…์ฐฝ ๋†’์ด ์ฆ๊ฐ€ */
422
  margin-bottom: 10px;
423
  }
424
 
425
  .input-container {
426
- height: 45px !important; /* ์ž…๋ ฅ์ฐฝ ๋†’์ด ๊ฐ์†Œ */
427
  display: flex;
428
  align-items: center;
429
  gap: 10px;
@@ -435,12 +434,13 @@ body {
435
  color: white;
436
  border-radius: 8px;
437
  padding: 8px 12px;
438
- font-size: 0.9em;
439
  cursor: pointer;
440
  display: flex;
441
  align-items: center;
442
- gap: 5px;
443
- height: 35px;
 
444
  transition: all 0.3s ease;
445
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
446
  }
@@ -450,48 +450,40 @@ body {
450
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
451
  }
452
 
453
- .file-upload-icon svg {
454
- width: 20px;
455
- height: 20px;
456
- }
457
-
458
  .input-textbox {
459
- height: 35px !important;
460
  border-radius: 8px !important;
 
461
  }
462
 
463
  .send-button {
464
- height: 35px !important;
465
- min-width: 60px !important;
 
466
  }
467
 
468
  /* ํŒŒ์ผ ์—…๋กœ๋“œ ๋ฒ„ํŠผ ์ปจํ…Œ์ด๋„ˆ */
469
  .file-upload-container {
470
  display: flex;
471
  align-items: center;
472
- height: 35px;
473
- }
474
-
475
- /* ํŒŒ์ผ ์—…๋กœ๋“œ ํ…์ŠคํŠธ */
476
- .file-upload-text {
477
- font-size: 0.8em;
478
- margin-left: 5px;
479
- color: #ffffff;
480
  }
481
  """
482
 
483
- # UI ๊ตฌ์„ฑ ์ˆ˜์ •
 
484
  with gr.Blocks(css=CSS) as demo:
485
  with gr.Column():
486
  chatbot = gr.Chatbot(
487
  value=[],
488
- height=700, # ์ฑ„ํŒ…์ฐฝ ๋†’์ด ์ฆ๊ฐ€
489
  label="GiniGEN AI Assistant",
490
  elem_classes="chat-container"
491
  )
492
 
493
  with gr.Row(elem_classes="input-container"):
494
- with gr.Column(scale=1, min_width=150):
495
  file_upload = gr.File(
496
  label="๐Ÿ“",
497
  type="filepath",
@@ -500,10 +492,6 @@ with gr.Blocks(css=CSS) as demo:
500
  container=True,
501
  interactive=True,
502
  )
503
- gr.Markdown(
504
- "Txt/Csv/Parquet",
505
- elem_classes="file-upload-text"
506
- )
507
 
508
  with gr.Column(scale=4):
509
  msg = gr.Textbox(
@@ -514,7 +502,7 @@ with gr.Blocks(css=CSS) as demo:
514
  scale=1
515
  )
516
 
517
- with gr.Column(scale=1, min_width=60):
518
  send = gr.Button(
519
  "์ „์†ก",
520
  elem_classes="send-button custom-button",
@@ -562,7 +550,7 @@ with gr.Blocks(css=CSS) as demo:
562
  inputs=msg
563
  )
564
 
565
- # ์ด๋ฒคํŠธ ๋ฐ”์ธ๋”ฉ (์ด์ „๊ณผ ๋™์ผ)
566
  msg.submit(
567
  stream_chat,
568
  inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
@@ -588,4 +576,4 @@ with gr.Blocks(css=CSS) as demo:
588
  )
589
 
590
  if __name__ == "__main__":
591
- demo.launch()
 
416
  transform: scale(1.2);
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;
 
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
  }
 
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
  )
484
 
485
  with gr.Row(elem_classes="input-container"):
486
+ with gr.Column(scale=1, min_width=70):
487
  file_upload = gr.File(
488
  label="๐Ÿ“",
489
  type="filepath",
 
492
  container=True,
493
  interactive=True,
494
  )
 
 
 
 
495
 
496
  with gr.Column(scale=4):
497
  msg = gr.Textbox(
 
502
  scale=1
503
  )
504
 
505
+ with gr.Column(scale=1, min_width=70):
506
  send = gr.Button(
507
  "์ „์†ก",
508
  elem_classes="send-button custom-button",
 
550
  inputs=msg
551
  )
552
 
553
+ # ์ด๋ฒคํŠธ ๋ฐ”์ธ๋”ฉ
554
  msg.submit(
555
  stream_chat,
556
  inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
 
576
  )
577
 
578
  if __name__ == "__main__":
579
+ demo.launch()