itachi1234 commited on
Commit
8d2fe66
·
verified ·
1 Parent(s): 4e7bcc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -16,13 +16,12 @@ genai.configure(api_key=GOOGLE_API_KEY)
16
  model = genai.GenerativeModel('gemini-pro')
17
 
18
  # Generate text
19
- if prompt := st.chat_input("Hi, explain me what goal you want to achieve."):
20
  enprom = f"""
21
  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.
22
  show your suggestions of routines or tasks which will help to achieve the goal as a table of 3 column of Task title, with time to invest, and repetation frequency.
23
  Follow all the above instruction for this given input:- {prompt}"""
24
  completion = model.generate_content(enprom)
25
 
26
- response = palm.chat(messages=["Hello."])
27
- print(response.last) # 'Hello! What can I help you with?'
28
- response.reply("Can you tell me a joke?")
 
16
  model = genai.GenerativeModel('gemini-pro')
17
 
18
  # Generate text
19
+ if prompt := st.chat_input("Hi"):
20
  enprom = f"""
21
  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.
22
  show your suggestions of routines or tasks which will help to achieve the goal as a table of 3 column of Task title, with time to invest, and repetation frequency.
23
  Follow all the above instruction for this given input:- {prompt}"""
24
  completion = model.generate_content(enprom)
25
 
26
+ with st.chat_message("Assistant"):
27
+ st.write(completetion.text)