Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -81,9 +81,10 @@ col1, col2 = st.columns(2)
|
|
81 |
|
82 |
with col1:
|
83 |
# 기존 입력창
|
84 |
-
|
85 |
record_key = f"record_{i}"
|
86 |
-
|
|
|
87 |
if uploaded_data is not None and i < len(uploaded_data):
|
88 |
data_value = uploaded_data.iloc[i, 0]
|
89 |
if pd.isna(data_value):
|
@@ -93,8 +94,12 @@ with col1:
|
|
93 |
elif record_key not in st.session_state:
|
94 |
st.session_state[record_key] = ""
|
95 |
|
|
|
|
|
|
|
96 |
with st.expander(f"입력창 {i+1}", expanded=False):
|
97 |
st.text_area("생활기록부 내용 입력", key=record_key, height=150, value=st.session_state[record_key])
|
|
|
98 |
with col2:
|
99 |
# 키워드 선택 옵션
|
100 |
st.write("키워드 선택")
|
|
|
81 |
|
82 |
with col1:
|
83 |
# 기존 입력창
|
84 |
+
for i in range(5):
|
85 |
record_key = f"record_{i}"
|
86 |
+
|
87 |
+
# 업로드된 데이터가 있고 해당 인덱스에 데이터가 있는 경우
|
88 |
if uploaded_data is not None and i < len(uploaded_data):
|
89 |
data_value = uploaded_data.iloc[i, 0]
|
90 |
if pd.isna(data_value):
|
|
|
94 |
elif record_key not in st.session_state:
|
95 |
st.session_state[record_key] = ""
|
96 |
|
97 |
+
# 위젯 생성
|
98 |
+
for i in range(5):
|
99 |
+
record_key = f"record_{i}"
|
100 |
with st.expander(f"입력창 {i+1}", expanded=False):
|
101 |
st.text_area("생활기록부 내용 입력", key=record_key, height=150, value=st.session_state[record_key])
|
102 |
+
|
103 |
with col2:
|
104 |
# 키워드 선택 옵션
|
105 |
st.write("키워드 선택")
|