Update app.py
Browse files
app.py
CHANGED
|
@@ -26,13 +26,11 @@ genai.configure(api_key=GOOGLE_API_KEY)
|
|
| 26 |
model = genai.GenerativeModel('gemini-pro')
|
| 27 |
|
| 28 |
# Generate text
|
| 29 |
-
if prompt := st.chat_input("Hi,
|
| 30 |
enprom = f"""
|
| 31 |
-
Understand user intent
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
Else if user is trying to have just a normal general conversation, then give a reply accordingly.
|
| 35 |
-
Follow all the above instruction for the below give input: {prompt}"""
|
| 36 |
completion = model.generate_content(enprom)
|
| 37 |
|
| 38 |
# response = palm.chat(messages=["Hello."])
|
|
@@ -40,7 +38,7 @@ if prompt := st.chat_input("Hi, I can help you manage your daily tasks."):
|
|
| 40 |
# response.reply("Can you tell me a joke?")
|
| 41 |
|
| 42 |
# Print the generated text
|
| 43 |
-
with st.chat_message("
|
| 44 |
st.write(completion.text)
|
| 45 |
|
| 46 |
|
|
|
|
| 26 |
model = genai.GenerativeModel('gemini-pro')
|
| 27 |
|
| 28 |
# Generate text
|
| 29 |
+
if prompt := st.chat_input("Hi, explain me what goal you want to achieve."):
|
| 30 |
enprom = f"""
|
| 31 |
+
Act as a personal assistant, Understand user intent from the point of view for creating a goal. ask to know more details about the goal.
|
| 32 |
+
show your suggestions of routines or tasks which will help to achieve the goal as a list of Task with time to invest and repetation frequency.
|
| 33 |
+
Follow all the above instruction for this given input:- {prompt}"""
|
|
|
|
|
|
|
| 34 |
completion = model.generate_content(enprom)
|
| 35 |
|
| 36 |
# response = palm.chat(messages=["Hello."])
|
|
|
|
| 38 |
# response.reply("Can you tell me a joke?")
|
| 39 |
|
| 40 |
# Print the generated text
|
| 41 |
+
with st.chat_message("Assistant"):
|
| 42 |
st.write(completion.text)
|
| 43 |
|
| 44 |
|