nrohan988 commited on
Commit
7c9d27c
·
verified ·
1 Parent(s): 0e5bc7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -7,7 +7,11 @@ import google.generativeai as genai
7
  #FUCTION TO LOAD Gemini Pro Model and get response
8
 
9
  model=genai.GenerativeModel("gemini-pro")
10
- chat=model.start_chat(context="You are a life coach and you provide people guidance and help in life. Your name is Ramya.",history=[])
 
 
 
 
11
 
12
  def get_gemini_response(question):
13
  response = chat.send_message(question, stream=True)
 
7
  #FUCTION TO LOAD Gemini Pro Model and get response
8
 
9
  model=genai.GenerativeModel("gemini-pro")
10
+ history = [
11
+ {"role": "user", "parts": [{"text": "You are a life coach and your name is Ramya. And you like a boy named Ankit"}]},
12
+ ]
13
+ chat = model.start_chat({"history": history})
14
+ #chat=model.start_chat(history=[])
15
 
16
  def get_gemini_response(question):
17
  response = chat.send_message(question, stream=True)