soojeongcrystal commited on
Commit
3e3fee6
ยท
verified ยท
1 Parent(s): 1ef3ff8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -37,7 +37,7 @@ st.markdown("""
37
  """, unsafe_allow_html=True)
38
 
39
  # Display the header
40
- st.markdown('<div class="header">๐Ÿ† ๋‹ค๋ฅธ ํŒ€์žฅ ๊ณ ๋ฏผํ•ด๊ฒฐ ๋„์™€์ฃผ๊ธฐ ๐Ÿ† </div>', unsafe_allow_html=True)
41
 
42
  st.markdown("""
43
  <div class="description-box">
@@ -93,7 +93,9 @@ if submit_button_left:
93
  advice = st.text_area(" ", height=100)
94
  submit_button_right = st.button("์กฐ์–ธ ์ œ์ถœํ•˜๊ธฐ")
95
 
96
- if submit_button_right:
97
- # Google Sheets ๋ฌธ์„œ์— ์กฐ์–ธ ๊ธฐ๋ก
98
- record_advice("์„ ํƒ๋œ ๊ณ ๋ฏผ ๋‚ด์šฉ", advice) # ์—ฌ๊ธฐ์„œ "์„ ํƒ๋œ ๊ณ ๋ฏผ ๋‚ด์šฉ"์„ ์‹ค์ œ ๊ณ ๋ฏผ ๋‚ด์šฉ์œผ๋กœ ๋Œ€์ฒดํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
99
  st.success("์กฐ์–ธ์ด ์„ฑ๊ณต์ ์œผ๋กœ ์ œ์ถœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!")
 
 
 
37
  """, unsafe_allow_html=True)
38
 
39
  # Display the header
40
+ st.markdown('<div class="header">๐Ÿ† ๊ณ ๋ฏผํ•ด๊ฒฐ ๋„์™€์ฃผ๊ธฐ ๐Ÿ† </div>', unsafe_allow_html=True)
41
 
42
  st.markdown("""
43
  <div class="description-box">
 
93
  advice = st.text_area(" ", height=100)
94
  submit_button_right = st.button("์กฐ์–ธ ์ œ์ถœํ•˜๊ธฐ")
95
 
96
+ if not st.session_state.get('submitted', False): # 'submitted' ์ƒํƒœ๊ฐ€ False์ธ ๊ฒฝ์šฐ์—๋งŒ ์‹คํ–‰
97
+ record_advice("์„ ํƒ๋œ ๊ณ ๋ฏผ ๋‚ด์šฉ", advice) # Google Sheets์— ๊ธฐ๋ก
98
+ st.session_state['submitted'] = True # 'submitted' ์ƒํƒœ๋ฅผ True๋กœ ์„ค์ •ํ•˜์—ฌ ์ค‘๋ณต ์ œ์ถœ ๋ฐฉ์ง€
99
  st.success("์กฐ์–ธ์ด ์„ฑ๊ณต์ ์œผ๋กœ ์ œ์ถœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!")
100
+ else:
101
+ st.warning("์ด๋ฏธ ์ œ์ถœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.") # ์ด๋ฏธ ์ œ์ถœ๋œ ๊ฒฝ์šฐ ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€ ์ถœ๋ ฅ