Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import google.generativeai as genai
|
|
| 5 |
from streamlit_extras.colored_header import colored_header
|
| 6 |
from streamlit_extras.add_vertical_space import add_vertical_space
|
| 7 |
import markdown
|
|
|
|
| 8 |
|
| 9 |
# Google Gemini API 키 설정
|
| 10 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
|
@@ -131,4 +132,9 @@ elif generate_button and not achievement_standard:
|
|
| 131 |
# 이미 생성된 교육과정이 있을 경우 이를 출력
|
| 132 |
if "generated_curriculum" in st.session_state and st.session_state.generated_curriculum:
|
| 133 |
html_text = markdown.markdown(st.session_state.generated_curriculum, extensions=['tables'])
|
| 134 |
-
output_area.markdown(html_text, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
from streamlit_extras.colored_header import colored_header
|
| 6 |
from streamlit_extras.add_vertical_space import add_vertical_space
|
| 7 |
import markdown
|
| 8 |
+
import pyperclip
|
| 9 |
|
| 10 |
# Google Gemini API 키 설정
|
| 11 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
|
|
|
| 132 |
# 이미 생성된 교육과정이 있을 경우 이를 출력
|
| 133 |
if "generated_curriculum" in st.session_state and st.session_state.generated_curriculum:
|
| 134 |
html_text = markdown.markdown(st.session_state.generated_curriculum, extensions=['tables'])
|
| 135 |
+
output_area.markdown(html_text, unsafe_allow_html=True)
|
| 136 |
+
|
| 137 |
+
# 복사 버튼 추가 (이미 생성된 경우)
|
| 138 |
+
if st.button("출력 내용 복사"):
|
| 139 |
+
pyperclip.copy(st.session_state.generated_curriculum)
|
| 140 |
+
st.success("복사되었습니다!")
|