ll7098ll commited on
Commit
8ccc88e
·
verified ·
1 Parent(s): 49c39d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -30
app.py CHANGED
@@ -107,33 +107,4 @@ with st.sidebar:
107
  generate_scenario_button = st.button("💕 시나리오 생성! 💕")
108
 
109
  # 메인 영역 출력
110
- scenario_output_area = st.empty()
111
-
112
- if generate_scenario_button:
113
- scenario_result = generate_date_scenario(my_name, my_gender, my_mbti, partner_name, partner_gender, partner_mbti, situation)
114
- st.session_state.generated_scenario = scenario_result
115
-
116
- if scenario_result:
117
- st.subheader("시나리오 결과")
118
- temp_div = f"""
119
- <div id="temp_copy_div" style="display:none;">{scenario_result}</div>
120
- """
121
- st.markdown(temp_div, unsafe_allow_html=True) # hidden div for copy
122
- scenario_output_area.markdown(scenario_result, unsafe_allow_html=True) # markdown 형식으로 출력
123
-
124
- copy_button = f"""
125
- <button onclick="copy_to_clipboard()">📄 시나리오 복사</button>
126
- <script>
127
- function copy_to_clipboard() {{
128
- var text = document.getElementById('temp_copy_div').innerText;
129
- var elem = document.createElement('textarea');
130
- elem.value = text;
131
- document.body.appendChild(elem);
132
- elem.select();
133
- document.execCommand('copy');
134
- document.body.removeChild(elem);
135
- alert("시나리오가 복사되었습니다!");
136
- }}
137
- </script>
138
- """
139
- st.markdown(copy_button, unsafe_allow_html=True)
 
107
  generate_scenario_button = st.button("💕 시나리오 생성! 💕")
108
 
109
  # 메인 영역 출력
110
+ scenario_output_area = st.empty()