Spaces:
Sleeping
Sleeping
File size: 1,113 Bytes
ef78361 | 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 | """๊ณ์ธต ๋ถ์ Feature Plugin.
API: /api/v1/hierarchy
ADR-017: Hierarchy Generator Python Migration
"""
import streamlit as st
from . import request, monitor
FEATURE_CONFIG = {
"key": "hierarchy",
"name": "๊ณ์ธต ๋ถ์",
"icon": "๐",
"description": "ํค์๋ ๊ธฐ๋ฐ ์๋น์ ์ฌ์ ๊ณ์ธต ๋ถ์ ๋ฐ ์ง๋ฌธ ์์ฑ",
"api_base": "/api/v1/hierarchy",
"order": 5,
}
def render(base_ctx):
"""๊ณ์ธต ๋ถ์ feature ๋ ๋๋ง."""
st.caption("ํค์๋๋ฅผ ์
๋ ฅํ๋ฉด ์๋น์ ์ฌ์ (CEJ) ๊ธฐ๋ฐ์ผ๋ก ๊ณ์ธต ๊ตฌ์กฐ๋ฅผ ๋ถ์ํ๊ณ ์ง๋ฌธ์ ์์ฑํฉ๋๋ค")
tabs = st.tabs([
"๐ ๋ถ์ ์์ฒญ",
"โณ ์งํ ํํฉ",
"๐ ๋ถ์ ๊ฒฐ๊ณผ",
])
tab_renderers = [
("๋ถ์ ์์ฒญ", request.render),
("์งํ ํํฉ", monitor.render_active),
("๋ถ์ ๊ฒฐ๊ณผ", monitor.render_history),
]
for tab, (label, renderer) in zip(tabs, tab_renderers):
with tab:
try:
renderer(base_ctx)
except Exception as e:
st.error(f"{label} ๋ก๋ฉ ์คํจ: {e}")
|