AndrewRWilliams commited on
Commit
327d778
·
1 Parent(s): d1754e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -10,8 +10,7 @@ from openai import Completion as complete
10
  mcq_prompt = "Generate French MCQs on the above text. Each MCQ must have four choices. Generate ten questions with answers:"
11
 
12
  openai.api_key = os.environ["openai_api_key"]
13
- # access_code = os.environ["access_code"]
14
- access_code = None
15
 
16
  def generate_questions(context, credentials, mcq_prompt=mcq_prompt):
17
  """
@@ -53,9 +52,9 @@ with gr.Blocks() as demo:
53
 
54
  quiz_button = gr.Button("Générer dix questions.")
55
 
56
- quiz_button.click(fn= generate_questions,
57
- inputs=[context, credentials],
58
- outputs=qa_pairs)
59
 
60
  if __name__ == "__main__":
61
  demo.launch()
 
10
  mcq_prompt = "Generate French MCQs on the above text. Each MCQ must have four choices. Generate ten questions with answers:"
11
 
12
  openai.api_key = os.environ["openai_api_key"]
13
+ access_code = os.environ["access_code"]
 
14
 
15
  def generate_questions(context, credentials, mcq_prompt=mcq_prompt):
16
  """
 
52
 
53
  quiz_button = gr.Button("Générer dix questions.")
54
 
55
+ quiz_button.click(fn=generate_questions,
56
+ inputs=[context, credentials],
57
+ outputs=qa_pairs)
58
 
59
  if __name__ == "__main__":
60
  demo.launch()