babelAI commited on
Commit
d4c8e4f
Β·
verified Β·
1 Parent(s): 36a658e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -4
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="DataStreams' Chat Model", page_icon=":robot:")
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("You: ", key= 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)