Spaces:
Runtime error
Runtime error
Update app.py
Browse files2 unmodified lines3456789101112131415165 unmodified lines222324252627281 unmodified line303132333435362 unmodified linesfrom langchain.schema import AIMessage, HumanMessage, SystemMessage# Streamlit UI μ€μ st.set_page_config(page_title="λνν AI λ΄-μλ£ μλ΄", page_icon=":robot:")#st.header("μλ νμΈμ. μ λ μλ£ μλ΄ AI μ±λ΄μΌλ‘ λ§μνμλ κ²μ κΈ°μ΅ν©λλ€. κ³μν΄μ μ§λ¬Έν΄μ£Όμλ©΄ λμ.")st.header("hello. I am a medical consultation AI chatbot. You can continue to ask questions.(It takes time. Wait a sec")# μΈμ λ©μμ§ μ΄κΈ°νif "sessionMessages" not in st.session_state:st.session_state.sessionMessages = [SystemMessage(content="You are a renowned medical doctor.")]# λλ΅ λ‘λ ν¨μ5 unmodified lines# μ¬μ©μ μ λ ₯ λ°κΈ°def get_text():#input_text = st.text_input("μλ΄μ: ", key="input")input_text = st.text_input("Client: ", key="input")return input_text1 unmodified linechat = ChatOpenAI(temperature=0.7)user_input = get_text()#submit = st.button('μλ΄νκΈ°')submit = st.button('Counsel')if submit:2 unmodified lines3456789101112131415161718195 unmodified lines252627282930311 unmodified line333435363738392 unmodified linesfrom langchain.schema import AIMessage, HumanMessage, SystemMessage# Streamlit UI μ€μ st.set_page_config(page_title="κ²½κΈ°μΌλ³΄ ν€λλΌμΈ μμ± AI", page_icon=":robot:")#st.header("μλ νμΈμ. κΈ°μ¬λ΄μ©μ μ λ ₯ν΄μ£ΌμΈμ.")st.header("μλ νμΈμ. κΈ°μ¬λ΄μ©μ μ λ ₯νμλ©΄ λ©μ§ κΈ°μ¬ μ λͺ©μ μμ±ν΄λ립λλ€!")# μΈμ λ©μμ§ μ΄κΈ°νif "sessionMessages" not in st.session_state:st.session_state.sessionMessages = [SystemMessage(content="Imagine you are a seasoned journalist with a keen insight into societal trends, audience interests, and the pulse of current events. You have a knack for condensing complex stories into captivating titles that instantly grab attention. Your task is to create a newspaper article title that resonates with readers by sparking curiosity, offering value, or highlighting urgent issues. The title should be concise, no more than ten words, and must cleverly use language to intrigue, provoke thought, or convey the significance of the story. Consider using puns, alliterations, or unexpected juxtapositions to make the title memorable. Reflect on the core message of the article, its impact on the reader, and the broader implications for society. The title should stand as a call to action or an invitation to delve deeper into the narrative, compelling the subscriber to engage with the content immediatelyMake a Korean title on the upper article.")]# λλ΅ λ‘λ ν¨μ5 unmodified lines# μ¬μ©μ μ λ ₯ λ°κΈ°def get_text():#input_text = st.text_input("κΈ°μ: ", key="input")input_text = st.text_input("Client: ", key="input")return input_text1 unmodified linechat = ChatOpenAI(temperature=0.7)user_input = get_text()#submit = st.button('μ λͺ© μμ±νκΈ°')submit = st.button('Counsel')if submit:
app.py+9-6