muhh-b commited on
Commit
e9a5b96
โ€ข
1 Parent(s): a7d1d91

Update quiz_generation.py

Browse files
Files changed (1) hide show
  1. quiz_generation.py +3 -1
quiz_generation.py CHANGED
@@ -3,6 +3,7 @@ import os
3
  from apiclient import discovery
4
  from oauth2client import client, file, tools
5
  import bardapi
 
6
 
7
 
8
  SCOPES = "https://www.googleapis.com/auth/forms.body"
@@ -17,7 +18,8 @@ NEW_FORM = {
17
 
18
  def generate_quiz_questions(prompt):
19
  # Set your Bard API key as an environment variable
20
- os.environ['_BARD_API_KEY'] = "WwgqSrcbBC71HsiWpTlqnbDC9TQ3-9N1YyY6CHxOEfFp_qeCe0laziZoOT_dkTEjhJmOcw."
 
21
 
22
  prompt_suffix = ". Each generated question has to begin with '๐Ÿ”น', each choice has to begin with '๐Ÿ”ธ', and each correct answer has to begin with 'โœ”๏ธ'."
23
 
 
3
  from apiclient import discovery
4
  from oauth2client import client, file, tools
5
  import bardapi
6
+ import streamlit
7
 
8
 
9
  SCOPES = "https://www.googleapis.com/auth/forms.body"
 
18
 
19
  def generate_quiz_questions(prompt):
20
  # Set your Bard API key as an environment variable
21
+
22
+ os.environ['_BARD_API_KEY'] = st.secrets["bard_api_key"]
23
 
24
  prompt_suffix = ". Each generated question has to begin with '๐Ÿ”น', each choice has to begin with '๐Ÿ”ธ', and each correct answer has to begin with 'โœ”๏ธ'."
25