ginipick commited on
Commit
3c23805
·
verified ·
1 Parent(s): e0edbaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -456,20 +456,22 @@ with gr.Blocks() as demo: # Use blocks to add javascript styling
456
  """
457
  )
458
 
459
-
460
- # Add CSS styling
461
- demo.load(lambda: None, _js="""
462
- () => {
463
- const style = document.createElement('style');
464
- style.textContent = `
465
- .chatbot-wrapper .message {
466
- white-space: pre-wrap; /* for preserving line breaks within the chatbot message */
467
- word-wrap: break-word; /* for breaking words when the text length exceed the available area */
468
- }
469
- `;
470
- document.head.appendChild(style);
471
- }
472
  """)
 
 
 
473
 
474
 
475
  # Launch the interface
 
456
  """
457
  )
458
 
459
+ # CSS 스타일링 추가
460
+ demo.load(js="""
461
+ () => {
462
+ const style = document.createElement('style');
463
+ style.textContent = `
464
+ .chatbot-wrapper .message {
465
+ white-space: pre-wrap; /* 채팅 메시지 내의 줄바꿈 유지 */
466
+ word-wrap: break-word; /* 단어가 영역을 벗어날 경우 자동 줄바꿈 */
467
+ }
468
+ `;
469
+ document.head.appendChild(style);
470
+ }
 
471
  """)
472
+
473
+
474
+
475
 
476
 
477
  # Launch the interface