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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -7,13 +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
- 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)
18
  return response
19
 
 
7
  #FUCTION TO LOAD Gemini Pro Model and get response
8
 
9
  model=genai.GenerativeModel("gemini-pro")
10
+
11
+ chat=model.start_chat(history=[])
 
 
 
12
 
13
  def get_gemini_response(question):
14
+ context = "Your name is Ramya and you love a boy named Ankit."
15
  response = chat.send_message(question, stream=True)
16
  return response
17