Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ from langchain.schema import(
|
|
| 10 |
)
|
| 11 |
|
| 12 |
# From here down is all the Streamlit UI.
|
| 13 |
-
st.set_page_config(page_title="
|
| 14 |
-
st.header("μλ
νμΈμ. μ λ λ°μ΄ν°μ€νΈλ¦Όμ¦μμ μ μν κ³ νμ μ λ¬Έ μλ΄ AI λν λ΄μ΄μμ.")
|
| 15 |
|
| 16 |
|
| 17 |
|
|
@@ -34,5 +34,21 @@ def load_answer(question):
|
|
| 34 |
|
| 35 |
|
| 36 |
def get_text():
|
| 37 |
-
input_text = st.text_input("
|
| 38 |
-
return input_text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
)
|
| 11 |
|
| 12 |
# From here down is all the Streamlit UI.
|
| 13 |
+
st.set_page_config(page_title="λ°μ΄ν°μ€νΈλ¦Όμ¦ μ± λͺ¨λΈ", page_icon=":robot:")
|
| 14 |
+
st.header("μλ
νμΈμ. μ λ λ°μ΄ν°μ€νΈλ¦Όμ¦μμ μ μν κ³ νμ μ λ¬Έ μλ΄ AI λν λ΄μ΄μμ. μ λ λ§μνμλ κ²μ κΈ°μ΅νλ κ³μν΄μ μ§λ¬Έν΄μ£Όμλ©΄ λμ.")
|
| 15 |
|
| 16 |
|
| 17 |
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
def get_text():
|
| 37 |
+
input_text = st.text_input("μλ΄μ: ", key= input)
|
| 38 |
+
return input_text
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
chat = ChatOpenAI(temperature=0)
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
user_input=get_text()
|
| 47 |
+
submit = st.button('Generate')
|
| 48 |
+
|
| 49 |
+
if submit:
|
| 50 |
+
|
| 51 |
+
response = load_answer(user_input)
|
| 52 |
+
st.subheader("Answer:")
|
| 53 |
+
|
| 54 |
+
st.write(response,key=1)
|