Spaces:
Running
Running
File size: 3,149 Bytes
c2ba4d5 1f117c0 519b5be 1f117c0 c2ba4d5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
import streamlit as st
def Navbar(sidebar_placeholder, toggle_hashstr: str = ""):
st.markdown("""
<style>
#root > div:nth-child(1) > div.withScreencast > div > div > section.stSidebar.st-emotion-cache-11wc8as.eczjsme18 > div.st-emotion-cache-6qob1r.eczjsme11 > div.st-emotion-cache-bjn8wh.eczjsme17 > div,
#root > div:nth-child(1) > div.withScreencast > div > div > section.stSidebar.st-emotion-cache-11wc8as.eczjsme18 > div.st-emotion-cache-6qob1r.eczjsme11 > div.st-emotion-cache-bjn8wh.eczjsme17 > ul{
display: none;
}
</style>
""", 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)
|