Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,17 @@ from langchain_openai import ChatOpenAI
|
|
3 |
from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
4 |
|
5 |
# Streamlit UI μ€μ
|
6 |
-
st.set_page_config(page_title="
|
7 |
-
#st.header("μλ
νμΈμ.
|
8 |
-
st.header("
|
9 |
|
10 |
# μΈμ
λ©μμ§ μ΄κΈ°ν
|
11 |
if "sessionMessages" not in st.session_state:
|
12 |
st.session_state.sessionMessages = [
|
13 |
-
SystemMessage(content="
|
|
|
|
|
|
|
14 |
]
|
15 |
|
16 |
# λλ΅ λ‘λ ν¨μ
|
@@ -22,7 +25,7 @@ def load_answer(question):
|
|
22 |
|
23 |
# μ¬μ©μ μ
λ ₯ λ°κΈ°
|
24 |
def get_text():
|
25 |
-
#input_text = st.text_input("
|
26 |
input_text = st.text_input("Client: ", key="input")
|
27 |
return input_text
|
28 |
|
@@ -30,7 +33,7 @@ def get_text():
|
|
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:
|
|
|
3 |
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("μλ
νμΈμ. κΈ°μ¬λ΄μ©μ μ
λ ₯ν΄μ£ΌμΈμ.")
|
8 |
+
st.header("μλ
νμΈμ. κΈ°μ¬λ΄μ©μ μ
λ ₯νμλ©΄ λ©μ§ κΈ°μ¬ μ λͺ©μ μμ±ν΄λ립λλ€!")
|
9 |
|
10 |
# μΈμ
λ©μμ§ μ΄κΈ°ν
|
11 |
if "sessionMessages" not in st.session_state:
|
12 |
st.session_state.sessionMessages = [
|
13 |
+
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 immediately
|
14 |
+
|
15 |
+
|
16 |
+
Make a Korean title on the upper article.")
|
17 |
]
|
18 |
|
19 |
# λλ΅ λ‘λ ν¨μ
|
|
|
25 |
|
26 |
# μ¬μ©μ μ
λ ₯ λ°κΈ°
|
27 |
def get_text():
|
28 |
+
#input_text = st.text_input("κΈ°μ: ", key="input")
|
29 |
input_text = st.text_input("Client: ", key="input")
|
30 |
return input_text
|
31 |
|
|
|
33 |
chat = ChatOpenAI(temperature=0.7)
|
34 |
|
35 |
user_input = get_text()
|
36 |
+
#submit = st.button('μ λͺ© μμ±νκΈ°')
|
37 |
submit = st.button('Counsel')
|
38 |
|
39 |
if submit:
|