Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ for message in st.session_state.messages:
|
|
| 74 |
st.markdown(assistant_message_style(assistant_icon_path, message["content"]), unsafe_allow_html=True)
|
| 75 |
|
| 76 |
if not st.session_state.messages:
|
| 77 |
-
greeting =
|
| 78 |
st.session_state.messages.append({"role": "assistant", "content": greeting})
|
| 79 |
st.markdown(assistant_message_style(assistant_icon_path, greeting), unsafe_allow_html=True)
|
| 80 |
|
|
@@ -87,11 +87,11 @@ if prompt := st.chat_input():
|
|
| 87 |
|
| 88 |
# ์ธ์ฆ
|
| 89 |
if st.session_state.approval_state == "require":
|
| 90 |
-
if prompt.lower() ==
|
| 91 |
st.session_state.approval_state = "approved"
|
| 92 |
-
response = "
|
| 93 |
else:
|
| 94 |
-
response = "
|
| 95 |
# ์๋ต ์์ฑ
|
| 96 |
else:
|
| 97 |
result = re.sub(r'\s+', ' ', prompt)
|
|
|
|
| 74 |
st.markdown(assistant_message_style(assistant_icon_path, message["content"]), unsafe_allow_html=True)
|
| 75 |
|
| 76 |
if not st.session_state.messages:
|
| 77 |
+
greeting = '์ ๋ฌธ๊ธฐ์ฌ ์์ฝ ๋ชจ๋ธ ์
๋๋ค. ์ฌ์ฉ์ ์ํด์๋ "yes"๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์'
|
| 78 |
st.session_state.messages.append({"role": "assistant", "content": greeting})
|
| 79 |
st.markdown(assistant_message_style(assistant_icon_path, greeting), unsafe_allow_html=True)
|
| 80 |
|
|
|
|
| 87 |
|
| 88 |
# ์ธ์ฆ
|
| 89 |
if st.session_state.approval_state == "require":
|
| 90 |
+
if prompt.lower() == "yes":
|
| 91 |
st.session_state.approval_state = "approved"
|
| 92 |
+
response = "์ด์ ์ฌ์ฉ์ด ๊ฐ๋ฅํฉ๋๋ค. ๋จ, ๋ชจ๋ธ ํฌ๊ธฐ๊ฐ ์์ ๋ชจ๋ธ์ด์ฌ์ ์ฑ๋ฅ์ด ๊ธฐ๋์ ๋ชป๋ฏธ์น ์ ์์ต๋๋ค."
|
| 93 |
else:
|
| 94 |
+
response = "์ธ์ฆ์ ์คํจํ์์ต๋๋ค. ๋ค์ yes๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์"
|
| 95 |
# ์๋ต ์์ฑ
|
| 96 |
else:
|
| 97 |
result = re.sub(r'\s+', ' ', prompt)
|