import streamlit as st def Navbar(sidebar_placeholder, toggle_hashstr: str = ""): st.markdown(""" """, unsafe_allow_html=True) with sidebar_placeholder.container(): st.toggle( "๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด๋กœ ๋ณด๊ธฐ", value=st.session_state.get("korean", False), key=f"korean_toggle_{toggle_hashstr}", # Add this explicit key on_change=lambda: setattr( st.session_state, "korean", st.session_state.get(f"korean_toggle_{toggle_hashstr}", False), ), ) st.page_link( "app.py", label="Varco Arena ๊ตฌ๋™" if st.session_state.korean else "Run VARCO Arena", icon="๐Ÿ”ฅ", ) st.page_link( "pages/see_results.py", label="๊ฒฐ๊ณผ ๋ณด๊ธฐ" if st.session_state.korean else "See Results", icon="๐Ÿ“", disabled=st.session_state.get("is_running", False), ) st.page_link( "pages/brief_intro.py", label="์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋‚˜์š”?" if st.session_state.korean else "How it Works", icon="โ”", disabled=st.session_state.get("is_running", False), ) st.page_link( "pages/quick_start_guide.py", label="๋ณธ๊ฒฉ ์‚ฌ์šฉํ•˜๊ธฐ ๊ฐ€์ด๋“œ" if st.session_state.korean else "Quick Start Guide", icon="๐Ÿ’ฏ", disabled=st.session_state.get("is_running", False), ) related_links_en = """ **About** * [Paper](https://huggingface.co/papers/2411.01281) * [Blog (KR)](https://ncsoft.github.io/ncresearch/12cc62c1ea0d981971a8923401e8fe6a0f18563d) * [Inquiry](https://linkedin.com/in/deftson/) """.strip() related_links_kr = """ **About** * [๋…ผ๋ฌธ](https://huggingface.co/papers/2411.01281) * [๋ธ”๋กœ๊ทธ](https://ncsoft.github.io/ncresearch/12cc62c1ea0d981971a8923401e8fe6a0f18563d) * [๋ฌธ์˜](https://linkedin.com/in/deftson/) """.strip() st.info(related_links_kr if st.session_state.korean else related_links_en) st.divider() demo_warning_kr = "โ•โ—**๋ณธ ๋ฐ๋ชจ์—์„œ๋Š” ์ƒˆ๋กœ๊ณ ์นจ ํ›„์— ํ‰๊ฐ€ ๊ฒฐ๊ณผ๊ฐ€ ๋ณด์กด๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค**โ•โ— ์•ฑ์„ ์˜จ์ „ํžˆ ํ™œ์šฉํ•˜์‹œ๋ ค๋ฉด ๊ฐœ์ธ ๊ธฐ๊ธฐ์—์„œ ํ˜ธ์ŠคํŒ…ํ•˜์„ธ์š” (**๐Ÿ’ฏ๋ณธ๊ฒฉ ์‚ฌ์šฉํ•˜๊ธฐ ๊ฐ€์ด๋“œ** ์ฐธ์กฐ)" demo_warning_en = "โ•โ—For this demo, **evaluation results will not be preserved after refreshing**โ•โ— To fully utilize the app, please host it on your personal device (refer to **๐Ÿ’ฏQuick Start Guide**)" st.markdown(demo_warning_kr if st.session_state.korean else demo_warning_en)