Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,15 +8,11 @@ palm.configure(api_key=os.environ['PALM_KEY'])
|
|
| 8 |
# Select the PaLM 2 model
|
| 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.
|
| 20 |
|
| 21 |
|
| 22 |
|
|
|
|
| 8 |
# Select the PaLM 2 model
|
| 9 |
# model = 'models/text-bison-001'
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
if prompt := st.text_input("Write your message: "):
|
| 13 |
+
response = palm.chat(messages=prompt)
|
| 14 |
with st.chat_message("assistant"):
|
| 15 |
+
st.write(response.last)
|
| 16 |
|
| 17 |
|
| 18 |
|