fix: resolve UI layout overflow and dynamic sys path loading
Browse files- run_pipeline.py +3 -0
- src/utils/ui_templates.py +5 -11
- tests/smoke_test_rag.py +4 -0
run_pipeline.py
CHANGED
|
@@ -2,6 +2,9 @@ import os
|
|
| 2 |
import subprocess
|
| 3 |
import sys
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
def run_command(cmd):
|
| 7 |
print("\n========================================")
|
|
|
|
| 2 |
import subprocess
|
| 3 |
import sys
|
| 4 |
|
| 5 |
+
# ํ๋ก์ ํธ ๋ฃจํธ ๋๋ ํ ๋ฆฌ๋ฅผ Python ๊ฒฝ๋ก์ ์ถ๊ฐํ์ฌ ModuleNotFoundError ๋ฐฉ์ง
|
| 6 |
+
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
| 7 |
+
|
| 8 |
|
| 9 |
def run_command(cmd):
|
| 10 |
print("\n========================================")
|
src/utils/ui_templates.py
CHANGED
|
@@ -44,7 +44,8 @@ body, .gradio-container {
|
|
| 44 |
border-radius: 12px !important;
|
| 45 |
padding: 24px 20px !important;
|
| 46 |
background: #ffffff !important;
|
| 47 |
-
height: 700px !important;
|
|
|
|
| 48 |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04) !important;
|
| 49 |
display: flex !important;
|
| 50 |
flex-direction: column !important;
|
|
@@ -227,17 +228,10 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 227 |
border: none !important;
|
| 228 |
}
|
| 229 |
|
| 230 |
-
/* โโ ์ฑ๋ด ๋ด๋ถ Placeholder(์๊ฐ๊ธ ์์ญ)
|
| 231 |
.placeholder, [class*="placeholder"] {
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
align-items: center !important;
|
| 235 |
-
justify-content: flex-start !important;
|
| 236 |
-
padding-top: 40px !important;
|
| 237 |
-
height: 100% !important;
|
| 238 |
-
min-height: 400px !important;
|
| 239 |
-
flex-grow: 1 !important;
|
| 240 |
-
overflow: auto !important;
|
| 241 |
margin: 0 auto !important;
|
| 242 |
}
|
| 243 |
|
|
|
|
| 44 |
border-radius: 12px !important;
|
| 45 |
padding: 24px 20px !important;
|
| 46 |
background: #ffffff !important;
|
| 47 |
+
min-height: 700px !important;
|
| 48 |
+
height: 100% !important;
|
| 49 |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04) !important;
|
| 50 |
display: flex !important;
|
| 51 |
flex-direction: column !important;
|
|
|
|
| 228 |
border: none !important;
|
| 229 |
}
|
| 230 |
|
| 231 |
+
/* โโ ์ฑ๋ด ๋ด๋ถ Placeholder(์๊ฐ๊ธ ์์ญ) โโ */
|
| 232 |
.placeholder, [class*="placeholder"] {
|
| 233 |
+
padding: 20px !important;
|
| 234 |
+
overflow: auto !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
margin: 0 auto !important;
|
| 236 |
}
|
| 237 |
|
tests/smoke_test_rag.py
CHANGED
|
@@ -17,6 +17,10 @@ import os
|
|
| 17 |
import sys
|
| 18 |
import time
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
# Windows ํ๊ฒฝ์์ ์ ๋์ฝ๋ ์ด๋ชจ์ง ์ถ๋ ฅ ์ UnicodeEncodeError(cp949) ๋ฐฉ์ง๋ฅผ ์ํ stdout ์ธ์ฝ๋ฉ ์ฌ์ค์
|
| 21 |
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
| 22 |
|
|
|
|
| 17 |
import sys
|
| 18 |
import time
|
| 19 |
|
| 20 |
+
# ํ๋ก์ ํธ ๋ฃจํธ ๋๋ ํ ๋ฆฌ๋ฅผ Python ๊ฒฝ๋ก์ ์ถ๊ฐํ์ฌ ModuleNotFoundError ๋ฐฉ์ง
|
| 21 |
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
| 22 |
+
|
| 23 |
+
|
| 24 |
# Windows ํ๊ฒฝ์์ ์ ๋์ฝ๋ ์ด๋ชจ์ง ์ถ๋ ฅ ์ UnicodeEncodeError(cp949) ๋ฐฉ์ง๋ฅผ ์ํ stdout ์ธ์ฝ๋ฉ ์ฌ์ค์
|
| 25 |
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
| 26 |
|