app.py ํ๋๋ฅผ ๊ตฌ๋ํ๋ฉด ํจ์๋ก app_ home, app_ view, app_ predict, app_ compare์ด ๊ตฌ๋๋๊ฒ ํ ๊ฒ์ด๋ฏ๋ก
๋จผ์ , ํจ์๋ค์ ์ํฌํธํ๋ค
import streamlit as st
from app_home import run_home
from app_predict import run_predict
from app_view import run_view
from app_compare import run_compare
from streamlit_option_menu import option_menu
๋ณด์ด๋ ํ์ด์ง ๋ ์ด์์์ ๋๊ฒ, ์ฌ์ด๋๋ฐ๋ ๋๊ฒ ์กฐ์ ํ์๋ค
st.set_page_config(layout="wide", initial_sidebar_state="expanded")
์ฌ์ด๋๋ฐ๋ฅผ ๊พธ๋ฏธ๋ ํจ์๋ฅผ ๋ง๋ค๊ณ , ์ฌ์ด๋๋ฐ ๋ฉ๋ด๋ฅผ ํด๋ฆญํ๋ฉด ํจ์๊ฐ ํธ์ถ๋๊ฒ ํ์๋ค.
st.write์์ #์ ๊ฐฏ์๊ฐ ์ ์์๋ก ๊ธ์ ํฌ๊ธฐ๊ฐ ์ปค์ง๋ค. # ๋ค์๋ ๊ณต๋ฐฑ ํ์นธ์ด ์์ด์ผ ์ ์ฉ๋๋ค.
def main():
menu = ['Project Description','Viewing Stock Information','Predicting Stock Value','Comparing Domestic ETF']
with st.sidebar :
st.write('### ๊ตญ๋ด ์ฃผ์ ์ค์๊ฐ ์ฃผ๊ฐ ์์ธก๐๐')
choice = option_menu(' ',menu,
icons=["house",'bi bi-search',"bi bi-graph-up-arrow","bi bi-file-earmark-bar-graph"] , menu_icon="bi bi-buildings", default_index=0,
)
if choice == menu[0] :
run_home()
elif choice == menu[1]:
run_view()
elif choice == menu[2]:
run_predict()
elif choice == menu[3]:
run_compare()
if __name__ == '__main__':
main()
ํ๋ฉด์ ํ์๋๋ ์ฌ์ด๋๋ฐ
์์ด์ฝ 'name'์ ์ฐจ๋ก๋๋ก
"bi bi-buildings"
"house"
'bi bi-search'
"bi bi-graph-up-arrow"
"bi bi-file-earmark-bar-graph" ์ด๋ค.
์ํ๋ ์์ด์ฝ์ name์ ์๊ณ ์ถ๋ค๋ฉด, ์๋๋ฅผ ์ฐธ์กฐํ๋ฉด ๋๋ค.
https://icons.getbootstrap.com/
Bootstrap Icons
Official open source SVG icon library for Bootstrap
icons.getbootstrap.com
๐โ๐โ์ ๊ฐ์ ์์ด์ฝ์ ๋ค์ ์ฌ์ดํธ์์ ๋ณต์ฌํ์๋ค.
https://emojiegg.com/emoji-text-symbol/
emojiEgg
์ด๋ชจํฐ์ฝ, ๋ณ, ํํธ(์ฌ๋), ๋ํ, ํ์ดํ, ์ํ๊ธฐํธ, ์ซ์, ๊ธฐํธ, ์๋ฌธ์, ๋จ์, ํํ ๋ฑ ์ฌ๋ฌ ์ข ๋ฅ ํน์๋ฌธ์ ๋ชจ์
emojiegg.com