Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,8 @@ from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
|
4 |
|
5 |
# Streamlit UI μ€μ
|
6 |
st.set_page_config(page_title="λνν AI λ΄-μλ£ μλ΄", page_icon=":robot:")
|
7 |
-
st.header("μλ
νμΈμ. μ λ μλ£ μλ΄ AI μ±λ΄μΌλ‘ λ§μνμλ κ²μ κΈ°μ΅ν©λλ€. κ³μν΄μ μ§λ¬Έν΄μ£Όμλ©΄ λμ.")
|
|
|
8 |
|
9 |
# μΈμ
λ©μμ§ μ΄κΈ°ν
|
10 |
if "sessionMessages" not in st.session_state:
|
@@ -21,14 +22,16 @@ def load_answer(question):
|
|
21 |
|
22 |
# μ¬μ©μ μ
λ ₯ λ°κΈ°
|
23 |
def get_text():
|
24 |
-
input_text = st.text_input("μλ΄μ: ", key="input")
|
|
|
25 |
return input_text
|
26 |
|
27 |
# ChatOpenAI κ°μ²΄ μμ±
|
28 |
chat = ChatOpenAI(temperature=0.7)
|
29 |
|
30 |
user_input = get_text()
|
31 |
-
submit = st.button('μλ΄νκΈ°')
|
|
|
32 |
|
33 |
if submit:
|
34 |
response = load_answer(user_input)
|
|
|
4 |
|
5 |
# Streamlit UI μ€μ
|
6 |
st.set_page_config(page_title="λνν AI λ΄-μλ£ μλ΄", page_icon=":robot:")
|
7 |
+
#st.header("μλ
νμΈμ. μ λ μλ£ μλ΄ AI μ±λ΄μΌλ‘ λ§μνμλ κ²μ κΈ°μ΅ν©λλ€. κ³μν΄μ μ§λ¬Έν΄μ£Όμλ©΄ λμ.")
|
8 |
+
st.header("hello. I am a medical consultation AI chatbot. You can continue to ask questions.(It takes time. Wait a sec")
|
9 |
|
10 |
# μΈμ
λ©μμ§ μ΄κΈ°ν
|
11 |
if "sessionMessages" not in st.session_state:
|
|
|
22 |
|
23 |
# μ¬μ©μ μ
λ ₯ λ°κΈ°
|
24 |
def get_text():
|
25 |
+
#input_text = st.text_input("μλ΄μ: ", key="input")
|
26 |
+
input_text = st.text_input("Client: ", key="input")
|
27 |
return input_text
|
28 |
|
29 |
# ChatOpenAI κ°μ²΄ μμ±
|
30 |
chat = ChatOpenAI(temperature=0.7)
|
31 |
|
32 |
user_input = get_text()
|
33 |
+
#submit = st.button('μλ΄νκΈ°')
|
34 |
+
submit = st.button('Counsel')
|
35 |
|
36 |
if submit:
|
37 |
response = load_answer(user_input)
|