llllllllllllllllllllllllllleeeeeeeeeeeeee
commited on
Commit
โข
629e3f7
1
Parent(s):
08f8b7f
Update app.py
Browse files
app.py
CHANGED
@@ -95,8 +95,8 @@ def get_real_news_summary(company, date):
|
|
95 |
# ์๋ต์์ ์์ฝ ์ถ์ถ
|
96 |
summary = response.choices[0].message.content
|
97 |
|
98 |
-
# ํ๊ธ, ์ซ์,
|
99 |
-
korean_only_summary = re.sub(r'[^\
|
100 |
|
101 |
# ##๋ก ์์ํ๋ ๋ถ๋ถ์ **์ผ๋ก ๊ฐ์ธ์ Bold ์ฒ๋ฆฌ
|
102 |
formatted_summary = re.sub(r'##\s*(.+)', r'**\1**', korean_only_summary)
|
|
|
95 |
# ์๋ต์์ ์์ฝ ์ถ์ถ
|
96 |
summary = response.choices[0].message.content
|
97 |
|
98 |
+
# ์ ๊ท ํํ์์ ์ฌ์ฉํด ํ๊ธ, ์ซ์, ๊ธฐํธ๋ง ๋จ๊ธฐ๊ณ ๋๋จธ์ง ์ ๊ฑฐ (์ผ๋ณธ์ด, ์ค๊ตญ์ด ๋ฑ ์ ๊ฑฐ)
|
99 |
+
korean_only_summary = re.sub(r'[^\uAC00-\uD7A3\u3131-\u318E\u1100-\u11FF\u3131-\uD79D0-9a-zA-Z\s#.,!%()\[\]]', '', summary)
|
100 |
|
101 |
# ##๋ก ์์ํ๋ ๋ถ๋ถ์ **์ผ๋ก ๊ฐ์ธ์ Bold ์ฒ๋ฆฌ
|
102 |
formatted_summary = re.sub(r'##\s*(.+)', r'**\1**', korean_only_summary)
|