Created
August 26, 2023 06:49
-
-
Save youtube-jocoding/b4a9f2080e730c6818d53aeb7a21062d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dotenv import load_dotenv | |
load_dotenv() | |
import streamlit as st | |
from langchain.chat_models import ChatOpenAI | |
chat_model = ChatOpenAI() | |
st.title('인공지능 시인') | |
content = st.text_input('시의 주제를 제시해주세요.') | |
if st.button('시 작성 요청하기'): | |
with st.spinner('시 작성 중...'): | |
result = chat_model.predict(content + "에 대한 시를 써줘") | |
st.write(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment