Commit
629e3f7
โ€ข
1 Parent(s): 08f8b7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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'[^\w\s#.,!%()\-\[\]]', '', summary)
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)