Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import matplotlib.font_manager as fm
|
|
9 |
import matplotlib.pyplot as plt
|
10 |
import yfinance as yf
|
11 |
import numpy as np
|
12 |
-
import re #
|
13 |
|
14 |
# 1. λλκ³ λ ν°νΈ μ€μΉ λ° μ μ©
|
15 |
def install_nanum_font():
|
@@ -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 |
return korean_only_summary
|
102 |
except Exception as e:
|
|
|
9 |
import matplotlib.pyplot as plt
|
10 |
import yfinance as yf
|
11 |
import numpy as np
|
12 |
+
import re # νκΈ, μ«μ, κΈ°νΈλ₯Ό λ¨κΈ°κΈ° μν μ κ· ννμμ μ¬μ©
|
13 |
|
14 |
# 1. λλκ³ λ ν°νΈ μ€μΉ λ° μ μ©
|
15 |
def install_nanum_font():
|
|
|
95 |
# μλ΅μμ μμ½ μΆμΆ
|
96 |
summary = response.choices[0].message.content
|
97 |
|
98 |
+
# νκΈ, μ«μ, 곡백, νΉμ κΈ°νΈλ§ λ¨κΈ°λ μ κ· ννμ
|
99 |
+
korean_only_summary = re.sub(r'[^\w\s#.,!%()-]', '', summary)
|
100 |
|
101 |
return korean_only_summary
|
102 |
except Exception as e:
|