Spaces:
Running
Running
Update quiz_generation.py
Browse files- 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 |
-
|
|
|
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 |
|