Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,15 @@ import matplotlib.pyplot as plt
|
|
9 |
import matplotlib.font_manager as fm
|
10 |
|
11 |
# ํ๊ธ ํฐํธ ์ค์
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
def load_data(file):
|
17 |
file_extension = file.name.split('.')[-1].lower()
|
@@ -33,7 +39,7 @@ def manual_data_entry():
|
|
33 |
num_rows = st.number_input("์ด๊ธฐ ํ์ ์๋ฅผ ์
๋ ฅํ์ธ์:", min_value=1, value=5)
|
34 |
data = pd.DataFrame(columns=col_names, index=range(num_rows))
|
35 |
|
36 |
-
edited_data = st.
|
37 |
|
38 |
return edited_data
|
39 |
return None
|
@@ -134,12 +140,13 @@ def main():
|
|
134 |
data = manual_data_entry()
|
135 |
|
136 |
if data is not None:
|
137 |
-
st.
|
138 |
-
st.write(
|
139 |
-
|
|
|
140 |
if st.button("๋ฐ์ดํฐ ๋ถ์ ์์"):
|
141 |
-
|
142 |
-
perform_analysis(
|
143 |
|
144 |
if __name__ == "__main__":
|
145 |
main()
|
|
|
9 |
import matplotlib.font_manager as fm
|
10 |
|
11 |
# ํ๊ธ ํฐํธ ์ค์
|
12 |
+
def set_font():
|
13 |
+
font_path = "path/to/your/Pretendard-Bold.ttf" # ์ค์ ํฐํธ ํ์ผ ๊ฒฝ๋ก๋ก ๋ณ๊ฒฝํด์ฃผ์ธ์
|
14 |
+
fm.fontManager.addfont(font_path)
|
15 |
+
plt.rcParams['font.family'] = 'Pretendard-Bold' # 'Pretendard-Bold'๋ฅผ ์ค์ ํฐํธ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํด์ฃผ์ธ์
|
16 |
+
plt.rcParams['axes.unicode_minus'] = False # ๋ง์ด๋์ค ๊ธฐํธ ๊นจ์ง ๋ฐฉ์ง
|
17 |
+
|
18 |
+
# Streamlit ์ค์ ์ ํฐํธ ์ ์ฉ
|
19 |
+
st.set_option('deprecation.showPyplotGlobalUse', False)
|
20 |
+
set_font()
|
21 |
|
22 |
def load_data(file):
|
23 |
file_extension = file.name.split('.')[-1].lower()
|
|
|
39 |
num_rows = st.number_input("์ด๊ธฐ ํ์ ์๋ฅผ ์
๋ ฅํ์ธ์:", min_value=1, value=5)
|
40 |
data = pd.DataFrame(columns=col_names, index=range(num_rows))
|
41 |
|
42 |
+
edited_data = st.data_editor(data, num_rows="dynamic")
|
43 |
|
44 |
return edited_data
|
45 |
return None
|
|
|
140 |
data = manual_data_entry()
|
141 |
|
142 |
if data is not None:
|
143 |
+
st.subheader("๋ฐ์ดํฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๋ฐ ์์ ")
|
144 |
+
st.write("๋ฐ์ดํฐ๋ฅผ ํ์ธํ๊ณ ํ์ํ ๊ฒฝ์ฐ ์์ ํ์ธ์:")
|
145 |
+
edited_data = st.data_editor(data, num_rows="dynamic")
|
146 |
+
|
147 |
if st.button("๋ฐ์ดํฐ ๋ถ์ ์์"):
|
148 |
+
processed_data = preprocess_data(edited_data)
|
149 |
+
perform_analysis(processed_data)
|
150 |
|
151 |
if __name__ == "__main__":
|
152 |
main()
|