Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,11 +90,18 @@ with col1:
|
|
90 |
st.session_state[record_key] = str(data_value)
|
91 |
elif record_key not in st.session_state:
|
92 |
st.session_state[record_key] = ""
|
|
|
93 |
with st.expander(f"์
๋ ฅ์ฐฝ {i+1}", expanded=False):
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
95 |
current_bytes = len(user_input.encode('utf-8'))
|
96 |
st.caption(f"ํ์ฌ ์
๋ ฅ์ฐฝ ๋ฐ์ดํธ ์: {current_bytes}")
|
97 |
|
|
|
98 |
with col2:
|
99 |
st.write("ํค์๋ ์ ํ")
|
100 |
selected_attitude = st.multiselect("ํ์ตํ๋", attitude_keywords)
|
@@ -107,4 +114,8 @@ with col2:
|
|
107 |
keyword_data = " ".join(selected_attitude + selected_relationship + selected_personality)
|
108 |
full_data = input_data + "\n" + keyword_data
|
109 |
generated_record = generate_living_record(full_data)
|
110 |
-
st.write("์์ฑ๋ ์ํ๊ธฐ๋ก๋ถ:", generated_record)
|
|
|
|
|
|
|
|
|
|
90 |
st.session_state[record_key] = str(data_value)
|
91 |
elif record_key not in st.session_state:
|
92 |
st.session_state[record_key] = ""
|
93 |
+
|
94 |
with st.expander(f"์
๋ ฅ์ฐฝ {i+1}", expanded=False):
|
95 |
+
col_text, col_button = st.columns([3, 1])
|
96 |
+
with col_text:
|
97 |
+
user_input = st.text_area("", key=record_key, height=150, value=st.session_state.get(record_key, ""))
|
98 |
+
with col_button:
|
99 |
+
if st.button("์ง์ฐ๊ธฐ", key=f"clear_{i}"):
|
100 |
+
clear_text(record_key)
|
101 |
current_bytes = len(user_input.encode('utf-8'))
|
102 |
st.caption(f"ํ์ฌ ์
๋ ฅ์ฐฝ ๋ฐ์ดํธ ์: {current_bytes}")
|
103 |
|
104 |
+
|
105 |
with col2:
|
106 |
st.write("ํค์๋ ์ ํ")
|
107 |
selected_attitude = st.multiselect("ํ์ตํ๋", attitude_keywords)
|
|
|
114 |
keyword_data = " ".join(selected_attitude + selected_relationship + selected_personality)
|
115 |
full_data = input_data + "\n" + keyword_data
|
116 |
generated_record = generate_living_record(full_data)
|
117 |
+
st.write("์์ฑ๋ ์ํ๊ธฐ๋ก๋ถ:", generated_record)
|
118 |
+
if 'generated_record' in st.session_state:
|
119 |
+
result_text = st.text_area("์์ฑ๋ ๊ฒฐ๊ณผ", value=st.session_state['generated_record'], height=500)
|
120 |
+
result_bytes = len(result_text.encode('utf-8'))
|
121 |
+
st.caption(f"์์ฑ๋ ๊ฒฐ๊ณผ ๋ฐ์ดํธ ์: {result_bytes}")
|