Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,9 @@ import os
|
|
| 10 |
import altair as alt
|
| 11 |
import colorsys
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# KoNLPy 형태소 분석기 초기화
|
| 14 |
@st.cache_resource
|
| 15 |
def load_okt():
|
|
@@ -38,9 +41,6 @@ def generate_colors(n):
|
|
| 38 |
HSV_tuples = [(x * 1.0 / n, 0.5, 0.9) for x in range(n)]
|
| 39 |
return ['#%02x%02x%02x' % tuple(int(x*255) for x in colorsys.hsv_to_rgb(*hsv)) for hsv in HSV_tuples]
|
| 40 |
|
| 41 |
-
# Streamlit 앱 설정
|
| 42 |
-
st.set_page_config(layout="wide") # 페이지를 와이드 모드로 설정
|
| 43 |
-
|
| 44 |
# CSS를 사용하여 헤더와 테이블 스타일 정의
|
| 45 |
st.markdown("""
|
| 46 |
<style>
|
|
@@ -56,7 +56,7 @@ st.markdown("""
|
|
| 56 |
z-index: 999;
|
| 57 |
}
|
| 58 |
.main-content {
|
| 59 |
-
margin-top: 60px;
|
| 60 |
}
|
| 61 |
.stDataFrame {
|
| 62 |
width: 100%;
|
|
@@ -84,7 +84,7 @@ header_html = """
|
|
| 84 |
st.markdown(header_html, unsafe_allow_html=True)
|
| 85 |
|
| 86 |
st.markdown('<div class="main-content">', unsafe_allow_html=True)
|
| 87 |
-
st.title('
|
| 88 |
|
| 89 |
# 사이드바 설정
|
| 90 |
st.sidebar.header('설정')
|
|
|
|
| 10 |
import altair as alt
|
| 11 |
import colorsys
|
| 12 |
|
| 13 |
+
# Streamlit 페이지 설정 (반드시 첫 번째 st 명령어여야 함)
|
| 14 |
+
st.set_page_config(layout="wide", page_title="한국어 토픽 모델링 앱")
|
| 15 |
+
|
| 16 |
# KoNLPy 형태소 분석기 초기화
|
| 17 |
@st.cache_resource
|
| 18 |
def load_okt():
|
|
|
|
| 41 |
HSV_tuples = [(x * 1.0 / n, 0.5, 0.9) for x in range(n)]
|
| 42 |
return ['#%02x%02x%02x' % tuple(int(x*255) for x in colorsys.hsv_to_rgb(*hsv)) for hsv in HSV_tuples]
|
| 43 |
|
|
|
|
|
|
|
|
|
|
| 44 |
# CSS를 사용하여 헤더와 테이블 스타일 정의
|
| 45 |
st.markdown("""
|
| 46 |
<style>
|
|
|
|
| 56 |
z-index: 999;
|
| 57 |
}
|
| 58 |
.main-content {
|
| 59 |
+
margin-top: 60px; /* 헤더의 높이만큼 여백 추가 */
|
| 60 |
}
|
| 61 |
.stDataFrame {
|
| 62 |
width: 100%;
|
|
|
|
| 84 |
st.markdown(header_html, unsafe_allow_html=True)
|
| 85 |
|
| 86 |
st.markdown('<div class="main-content">', unsafe_allow_html=True)
|
| 87 |
+
st.title('Topic Modeling for SK's Happiness')
|
| 88 |
|
| 89 |
# 사이드바 설정
|
| 90 |
st.sidebar.header('설정')
|