randmimc commited on
Commit
f701a00
ยท
verified ยท
1 Parent(s): 91f6af8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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)