Spaces:
Running
Running
Jeff Myers II
commited on
Commit
·
0271647
1
Parent(s):
e82292d
Completed Prototype
Browse files
app.py
CHANGED
@@ -243,8 +243,8 @@ with gr.Blocks() as demo:
|
|
243 |
elif not quiz: print("Quiz is empty.")
|
244 |
elif not isinstance(answers, list): print(f"Answers is a {type(answers)} but should be {type(list())}.")
|
245 |
else:
|
246 |
-
|
247 |
-
results = sum(1 for ans, resp in zip(answers,
|
248 |
percent = results / len(answers)
|
249 |
|
250 |
if 0.9 <= percent <= 1.0: evaluation = f"Excellent! You scored {results} of {len(answers)}."
|
|
|
243 |
elif not quiz: print("Quiz is empty.")
|
244 |
elif not isinstance(answers, list): print(f"Answers is a {type(answers)} but should be {type(list())}.")
|
245 |
else:
|
246 |
+
response = list(quiz)
|
247 |
+
results = sum(1 for ans, resp in zip(answers, response) if ans == resp)
|
248 |
percent = results / len(answers)
|
249 |
|
250 |
if 0.9 <= percent <= 1.0: evaluation = f"Excellent! You scored {results} of {len(answers)}."
|