CosmoAI commited on
Commit
3c56028
·
1 Parent(s): 9eff97e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from bardapi import Bard
7
 
8
  # load_dotenv()
9
 
10
- bardKey = "aQjBGndz_p9qdmaTSfmedlQODTMCa8iPeurM5mlJbzBzLISxmHRjXS-SIhbK_WsL3WIFUA."
11
  # os.environ.get('token')
12
 
13
  def bardChat(data):
@@ -25,10 +25,10 @@ def bardChat(data):
25
  }
26
 
27
  # Set the "__Secure-1PSID" cookie with the Bard API key
28
- session.cookies.set("__Secure-1PSID", bardKey)
29
 
30
  # Create a Bard object with the session and a timeout of 30 seconds
31
- bard = Bard(token=bardKey, session=session, timeout=30)
32
  answer = bard.get_answer(data)['content']
33
  print(answer)
34
  reply = {
 
7
 
8
  # load_dotenv()
9
 
10
+ # bardKey = "aQjBGndz_p9qdmaTSfmedlQODTMCa8iPeurM5mlJbzBzLISxmHRjXS-SIhbK_WsL3WIFUA."
11
  # os.environ.get('token')
12
 
13
  def bardChat(data):
 
25
  }
26
 
27
  # Set the "__Secure-1PSID" cookie with the Bard API key
28
+ session.cookies.set("__Secure-1PSID", "aQjBGndz_p9qdmaTSfmedlQODTMCa8iPeurM5mlJbzBzLISxmHRjXS-SIhbK_WsL3WIFUA.")
29
 
30
  # Create a Bard object with the session and a timeout of 30 seconds
31
+ bard = Bard(token="aQjBGndz_p9qdmaTSfmedlQODTMCa8iPeurM5mlJbzBzLISxmHRjXS-SIhbK_WsL3WIFUA.", session=session, timeout=30)
32
  answer = bard.get_answer(data)['content']
33
  print(answer)
34
  reply = {