Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def generate_ai_title():
|
|
| 26 |
return (tokenizer.batch_decode(outputs)[0])[15:-13]
|
| 27 |
|
| 28 |
# Function to check user's answer and update score
|
| 29 |
-
def check_answer(user_choice, real_index,
|
| 30 |
if (user_choice == "Option 1" and real_index == 0) or (user_choice == "Option 2" and real_index == 1):
|
| 31 |
score += 1
|
| 32 |
return f"Correct! Your current score is: {score}", score, gr.update(visible=True), gr.update(visible=False)
|
|
|
|
| 26 |
return (tokenizer.batch_decode(outputs)[0])[15:-13]
|
| 27 |
|
| 28 |
# Function to check user's answer and update score
|
| 29 |
+
def check_answer(user_choice, real_index, score):
|
| 30 |
if (user_choice == "Option 1" and real_index == 0) or (user_choice == "Option 2" and real_index == 1):
|
| 31 |
score += 1
|
| 32 |
return f"Correct! Your current score is: {score}", score, gr.update(visible=True), gr.update(visible=False)
|