dltmdgus commited on
Commit
8c65269
Β·
verified Β·
1 Parent(s): addfe87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -6,10 +6,6 @@ import seaborn as sns
6
  import matplotlib.font_manager as fm
7
  from matplotlib import rc
8
 
9
- # μ ˆλŒ€ 경둜둜 폰트 μ„€μ • (ν•„μš” μ‹œ)
10
- font_path = os.path.join(os.path.dirname(__file__), 'NanumGothic-Regular.ttf') # μ ˆλŒ€ 경둜
11
- font_prop = fm.FontProperties(fname=font_path)
12
- rc('font', family=font_prop.get_name())
13
 
14
  # μ‚¬μ΄λ“œλ°”μ— λͺ©μ°¨ μΆ”κ°€
15
  st.sidebar.title("λͺ©μ°¨")
@@ -54,6 +50,7 @@ if page == "μ—°λ ΉλŒ€ 및 성별에 λ”°λ₯Έ μƒμœ„ 5개 λŒ€μΆœ λ„μ„œ":
54
 
55
  # λ§‰λŒ€ κ·Έλž˜ν”„ μ‹œκ°ν™”
56
  if not filtered_books.empty:
 
57
  st.write(f"μƒμœ„ 5 λ„μ„œ (μ—°λ ΉλŒ€: {selected_age}, 성별: {selected_gender})")
58
  fig, ax = plt.subplots(figsize=(10, 6))
59
  sns.barplot(data=filtered_books, x='λ„μ„œλͺ…', y='λŒ€μΆœκ±΄μˆ˜', palette='viridis', ax=ax)
 
6
  import matplotlib.font_manager as fm
7
  from matplotlib import rc
8
 
 
 
 
 
9
 
10
  # μ‚¬μ΄λ“œλ°”μ— λͺ©μ°¨ μΆ”κ°€
11
  st.sidebar.title("λͺ©μ°¨")
 
50
 
51
  # λ§‰λŒ€ κ·Έλž˜ν”„ μ‹œκ°ν™”
52
  if not filtered_books.empty:
53
+ font_path = 'NanumGothic-Regular.ttf'
54
  st.write(f"μƒμœ„ 5 λ„μ„œ (μ—°λ ΉλŒ€: {selected_age}, 성별: {selected_gender})")
55
  fig, ax = plt.subplots(figsize=(10, 6))
56
  sns.barplot(data=filtered_books, x='λ„μ„œλͺ…', y='λŒ€μΆœκ±΄μˆ˜', palette='viridis', ax=ax)