Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
13 |
-
completion = palm.chat(messages=prompt)
|
14 |
|
15 |
# Print the generated text
|
16 |
-
st.
|
|
|
|
|
|
|
|
|
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 |
|