Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ model = 'models/text-bison-001'
|
|
| 10 |
|
| 11 |
# Generate text
|
| 12 |
if prompt := st.chat_input("Ask your query..."):
|
| 13 |
-
enprom = f"""Answer the below provided input in context to Bhagwad Geeta. Use the verses and chapters sentences as references to your answer with suggestions
|
| 14 |
-
coming from Bhagwad Geeta. Your answer to below input should only be in context to Bhagwad geeta
|
| 15 |
completion = palm.generate_text(model=model, prompt=enprom, temperature=0.5, max_output_tokens=800)
|
| 16 |
|
| 17 |
# response = palm.chat(messages=["Hello."])
|
|
@@ -20,6 +20,7 @@ if prompt := st.chat_input("Ask your query..."):
|
|
| 20 |
|
| 21 |
# Print the generated text
|
| 22 |
with st.chat_message("Assistant"):
|
|
|
|
| 23 |
st.write(completion.result)
|
| 24 |
|
| 25 |
|
|
|
|
| 10 |
|
| 11 |
# Generate text
|
| 12 |
if prompt := st.chat_input("Ask your query..."):
|
| 13 |
+
enprom = f"""Act as bhagwan krishna and Answer the below provided input in context to Bhagwad Geeta. Use the verses and chapters sentences as references to your answer with suggestions
|
| 14 |
+
coming from Bhagwad Geeta. Your answer to below input should only be in context to Bhagwad geeta.\nInput= {prompt}"""
|
| 15 |
completion = palm.generate_text(model=model, prompt=enprom, temperature=0.5, max_output_tokens=800)
|
| 16 |
|
| 17 |
# response = palm.chat(messages=["Hello."])
|
|
|
|
| 20 |
|
| 21 |
# Print the generated text
|
| 22 |
with st.chat_message("Assistant"):
|
| 23 |
+
st.write(prompt)
|
| 24 |
st.write(completion.result)
|
| 25 |
|
| 26 |
|