Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,15 +89,15 @@ if st.button("ํ๊ฐ ์์ฑ"):
|
|
89 |
sentence = line.split('",')[0].lstrip('("').strip()
|
90 |
sentences.append(sentence)
|
91 |
|
92 |
-
# ๋ฌธ์ฅ์ ๋ผ๋์ค ๋ฒํผ์ผ๋ก ํ์
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
|
|
|
89 |
sentence = line.split('",')[0].lstrip('("').strip()
|
90 |
sentences.append(sentence)
|
91 |
|
92 |
+
# ๋ฌธ์ฅ์ ๋ผ๋์ค ๋ฒํผ์ผ๋ก ํ์ ๋ฐ ์ ํ๋ ๋ฌธ์ฅ ์ ์ฅ
|
93 |
+
selected_index = st.radio("๋ฌธ์ฅ์ ์ ํํ์ธ์:", range(len(sentences)), format_func=lambda x: sentences[x])
|
94 |
+
st.session_state.selected_sentence = sentences[selected_index] if sentences else None
|
95 |
+
|
96 |
+
# ์ ์ฌํ ๋ฌธ์ฅ ์์ฑ ๋ฒํผ ์ถ๊ฐ
|
97 |
+
if st.button("์ ์ฌํ ๋ฌธ๊ตฌ ์์ฑ") and st.session_state.get('selected_sentence'):
|
98 |
+
with st.spinner('๋ฌธ์ฅ ์์ฑ์ค...'):
|
99 |
+
similar_sentences = generate_similar_sentences(st.session_state.selected_sentence)
|
100 |
+
for sentence in similar_sentences:
|
101 |
+
st.write(sentence)
|
102 |
|
103 |
|