CosmoAI commited on
Commit
a91e5a1
·
1 Parent(s): 6a2f7f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,14 +6,14 @@ import os
6
  palm.configure(api_key=os.environ['PALM_KEY'])
7
 
8
  # Select the PaLM 2 model
9
- model = 'models/text-bison-001'
10
 
11
  # Generate text
12
  prompt = st.text_input("Write your message: ")
13
- completion = palm.generate_text(model=model, prompt=prompt, temperature=0.5, max_output_tokens=800)
14
 
15
  # Print the generated text
16
- st.write(completion.result)
17
 
18
 
19
 
 
6
  palm.configure(api_key=os.environ['PALM_KEY'])
7
 
8
  # Select the PaLM 2 model
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