tommymarto commited on
Commit
cd9fbbc
Β·
verified Β·
1 Parent(s): 6dec495

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +2 -2
demo.py CHANGED
@@ -35,7 +35,7 @@ BASE_URL = "https://skapi.polyglot-edu.com/"
35
 
36
  levels = ["Primary School", "Middle School", "High School", "College", "Academy"]
37
  languages = ["English", "Italian", "French", "German", "Spanish"]
38
- type_of_exercise = ["Open Question", "Short Answer Question", "True or False", "Fill in the Blanks", "Single Choice", "Multiple Choice", "Debate", "Essay", "Brainstorming", "Knoledge Exposition"]
39
  bloom_levels = ["Remembering", "Understanding", "Applying", "Analyzing", "Evaluating", "Creating"]
40
 
41
  def like():
@@ -152,7 +152,7 @@ def format_output(output, exercise_type):
152
  return f"""<div class='markdown-body'><h3>Question:</h3><p>{output['Assignment']}</p><h3>Options:</h3><p>{
153
  "<br/>".join(["βœ…" + x for x in output['Solutions']] + ["❌" + x for x in output['Distractors'] + output["EasilyDiscardableDistractors"]])
154
  }</p></div>"""
155
- elif type_of_exercise[exercise_type] in ["Debate", "Essay", "Brainstorming", "Knoledge Exposition"]:
156
  return f"<div class='markdown-body'><h3>Assignment:</h3><p>{output['Assignment']}</p></div>"
157
  elif type_of_exercise[exercise_type] in ["Fill in the Blanks"]:
158
  return f"""<div class='markdown-body'><h3>Paragraph:</h3><p>{output['Plus']}</p><h3>Question:</h3><p>{output['Assignment']}</p><h3>Options:</h3><p>{
 
35
 
36
  levels = ["Primary School", "Middle School", "High School", "College", "Academy"]
37
  languages = ["English", "Italian", "French", "German", "Spanish"]
38
+ type_of_exercise = ["Open Question", "Short Answer Question", "True or False", "Fill in the Blanks", "Single Choice", "Multiple Choice", "Debate", "Essay", "Brainstorming", "Knowledge Exposition"]
39
  bloom_levels = ["Remembering", "Understanding", "Applying", "Analyzing", "Evaluating", "Creating"]
40
 
41
  def like():
 
152
  return f"""<div class='markdown-body'><h3>Question:</h3><p>{output['Assignment']}</p><h3>Options:</h3><p>{
153
  "<br/>".join(["βœ…" + x for x in output['Solutions']] + ["❌" + x for x in output['Distractors'] + output["EasilyDiscardableDistractors"]])
154
  }</p></div>"""
155
+ elif type_of_exercise[exercise_type] in ["Debate", "Essay", "Brainstorming", "Knowledge Exposition"]:
156
  return f"<div class='markdown-body'><h3>Assignment:</h3><p>{output['Assignment']}</p></div>"
157
  elif type_of_exercise[exercise_type] in ["Fill in the Blanks"]:
158
  return f"""<div class='markdown-body'><h3>Paragraph:</h3><p>{output['Plus']}</p><h3>Question:</h3><p>{output['Assignment']}</p><h3>Options:</h3><p>{