CosmoAI commited on
Commit
5f28fdf
·
1 Parent(s): a91e5a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -9,11 +9,14 @@ palm.configure(api_key=os.environ['PALM_KEY'])
9
  # model = 'models/text-bison-001'
10
 
11
  # Generate text
12
- prompt = st.text_input("Write your message: ")
13
- completion = palm.chat(messages=prompt)
14
 
15
  # Print the generated text
16
- st.write(completion.last)
 
 
 
 
17
 
18
 
19
 
 
9
  # model = 'models/text-bison-001'
10
 
11
  # Generate text
12
+ response = palm.chat(messages=["Hello"])
 
13
 
14
  # Print the generated text
15
+ st.chat_message(response.last)
16
+
17
+ if prompt := st.text_input("Write your message: "):
18
+ with st.chat_message("assistant"):
19
+ st.write(response.reply(prompt))
20
 
21
 
22