Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
| 14 |
|
| 15 |
# Print the generated text
|
| 16 |
-
st.write(completion.
|
| 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 |
|