Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions interface/pages_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Streamlit 애플리케이션 페이지 설정 모듈.

각 페이지의 경로와 제목을 정의하여 내비게이션에 사용합니다.

Attributes:
PAGES (list): Streamlit Page 객체 리스트.
- 홈 페이지
- Lang2SQL 페이지
- 그래프 빌더 페이지
"""

import streamlit as st

PAGES = [
st.Page("app_pages/home.py", title="🏠 홈"),
st.Page("app_pages/lang2sql.py", title="🔍 Lang2SQL"),
st.Page("app_pages/graph_builder.py", title="📊 그래프 빌더"),
]
55 changes: 35 additions & 20 deletions interface/streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
"""
Streamlit 애플리케이션 메인 실행 모듈.

이 모듈은 Lang2SQL 데이터 분석 도구의 내비게이션을 정의하고,
각 페이지를 연결하여 사용자가 원하는 기능을 선택할 수 있도록 합니다.

Example:
$ streamlit run interface/streamlit_app.py
Lang2SQL 데이터 분석 도구의 내비게이션을 초기화하고 실행합니다.
"""

import streamlit as st

st.set_page_config(
page_title="Lang2SQL 데이터 분석 도구",
page_icon="🔎",
layout="wide",
initial_sidebar_state="expanded",
)

PAGES = [
st.Page("app_pages/home.py", title="🏠 홈"),
st.Page("app_pages/lang2sql.py", title="🔍 Lang2SQL"),
st.Page("app_pages/graph_builder.py", title="📊 그래프 빌더"),
]

pg = st.navigation(PAGES)
pg.run()
from interface.pages_config import PAGES


def configure_app() -> None:
"""앱 전역 설정 초기화.

Streamlit 애플리케이션의 제목, 아이콘, 레이아웃, 사이드바 상태를 설정합니다.

Returns:
None
"""
st.set_page_config(
page_title="Lang2SQL 데이터 분석 도구",
page_icon="🔎",
layout="wide",
initial_sidebar_state="expanded",
)


def main() -> None:
"""애플리케이션 진입점.

전역 설정을 초기화하고, 정의된 페이지 내비게이션을 실행합니다.

Returns:
None
"""
configure_app()
pg = st.navigation(PAGES)
pg.run()


if __name__ == "__main__":
main()