Update app.py

#1
by jonghhhh - opened
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -54,7 +54,13 @@ if page == "์—ฐ๋ น๋Œ€ ๋ฐ ์„ฑ๋ณ„์— ๋”ฐ๋ฅธ ์ƒ์œ„ 5๊ฐœ ๋Œ€์ถœ ๋„์„œ":
54
 
55
  # ๋ง‰๋Œ€ ๊ทธ๋ž˜ํ”„ ์‹œ๊ฐํ™”
56
  if not filtered_books.empty:
57
- plt.rc('font', family='NanumGothicCoding')
 
 
 
 
 
 
58
 
59
  st.write(f"์ƒ์œ„ 5 ๋„์„œ (์—ฐ๋ น๋Œ€: {selected_age}, ์„ฑ๋ณ„: {selected_gender})")
60
  fig, ax = plt.subplots(figsize=(10, 6))
 
54
 
55
  # ๋ง‰๋Œ€ ๊ทธ๋ž˜ํ”„ ์‹œ๊ฐํ™”
56
  if not filtered_books.empty:
57
+ # NanumGothic-Regular.ttf ํฐํŠธ ๊ฒฝ๋กœ ์„ค์ •
58
+ font_path = 'NanumGothic-Regular.ttf'
59
+ fontprop = font_manager.FontProperties(fname=font_path)
60
+
61
+ # Matplotlib์— ํฐํŠธ ์„ค์ •
62
+ plt.rc('font', family=fontprop.get_name())
63
+ #plt.rc('font', family='NanumGothicCoding')
64
 
65
  st.write(f"์ƒ์œ„ 5 ๋„์„œ (์—ฐ๋ น๋Œ€: {selected_age}, ์„ฑ๋ณ„: {selected_gender})")
66
  fig, ax = plt.subplots(figsize=(10, 6))