itachi1234 commited on
Commit
164a657
·
verified ·
1 Parent(s): 6ee9a21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -19
app.py CHANGED
@@ -1,27 +1,17 @@
1
- import google.generativeai as genai
2
- import streamlit as st
3
- import os
4
  import json
5
- import random
6
- # from getvalues import getValues
7
- from datetime import datetime, timedelta
8
- import uuid
9
- import re
10
 
11
- # Set your API key
12
- # Or use `os.getenv('GOOGLE_API_KEY')` to fetch an environment variable.
13
  GOOGLE_API_KEY="AIzaSyCwSszcd45k1Ce0B48oiQnYPRdTLh49kg8"
14
 
15
  genai.configure(api_key=GOOGLE_API_KEY)
 
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.txt)
 
1
+ import streamlit as st
 
 
2
  import json
3
+ import google.generativeai as genai
 
 
 
 
4
 
 
 
5
  GOOGLE_API_KEY="AIzaSyCwSszcd45k1Ce0B48oiQnYPRdTLh49kg8"
6
 
7
  genai.configure(api_key=GOOGLE_API_KEY)
8
+
9
  model = genai.GenerativeModel('gemini-pro')
10
 
11
+ if prompt := st.chat_input("Hi, how can I help you?"):
 
12
  enprom = f"""
13
+ Act as a personal assistant, Understand user intent from the point of view for asking a few questions. ask to know more details about {prompt}
14
+ :- {prompt}"""
15
+ completetion = model.generate_content(enprom)
16
+ with st.chat_message("Assistant"):
17
+ st.write(completetion.text)