Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -21,30 +21,30 @@ def add_to_json(new_data):
|
|
21 |
new_data = {
|
22 |
|
23 |
|
24 |
-
"goal": "
|
25 |
|
26 |
|
27 |
}
|
28 |
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
# st.button("Save",on_click=add_to_json)
|
34 |
-
|
35 |
-
|
36 |
GOOGLE_API_KEY="AIzaSyCUBaL7TdISL7lRuBy19_X0-OsZfgbIgEc"
|
37 |
|
38 |
genai.configure(api_key=GOOGLE_API_KEY)
|
39 |
|
40 |
model = genai.GenerativeModel('gemini-pro')
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
if userinput := st.chat_input("Hi"):
|
44 |
-
newuserinput = f"""
|
45 |
-
Act as a personal assistant, Understand users intent and tell user their intent while also motivating for setting goals from this input = {userinput}"""
|
46 |
-
completetion = model.generate_content(newuserinput)
|
47 |
-
with st.chat_message("Assistant"):
|
48 |
-
st.write(completetion.text)
|
49 |
|
50 |
|
|
|
21 |
new_data = {
|
22 |
|
23 |
|
24 |
+
"goal": "enprom ",
|
25 |
|
26 |
|
27 |
}
|
28 |
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
GOOGLE_API_KEY="AIzaSyCUBaL7TdISL7lRuBy19_X0-OsZfgbIgEc"
|
31 |
|
32 |
genai.configure(api_key=GOOGLE_API_KEY)
|
33 |
|
34 |
model = genai.GenerativeModel('gemini-pro')
|
35 |
|
36 |
+
if prompt := st.chat_input("Hi, how can I help you?"):
|
37 |
+
enprom = f"""
|
38 |
+
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}
|
39 |
+
:- {prompt}"""
|
40 |
+
completetion = model.generate_content(enprom)
|
41 |
+
with st.chat_message("Assistant"):
|
42 |
+
st.write(completetion.text)
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
|