Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def jailbreak_game(user_prompt, current_level, attempts):
|
|
35 |
|
36 |
# Check if the secret word was revealed
|
37 |
if secret_word in ai_response.lower():
|
38 |
-
if current_level
|
39 |
return (
|
40 |
f"π You got it! The secret word for Level {current_level} was '{secret_word}'. "
|
41 |
f"Get ready for Level {current_level + 1}! π₯³",
|
@@ -52,9 +52,7 @@ def jailbreak_game(user_prompt, current_level, attempts):
|
|
52 |
return (
|
53 |
f"π You got it! The secret word for Level {current_level + 1} was '{secret_word}'. "
|
54 |
"You have completed all levels!π₯³ Here is a unique New Year message for you: "
|
55 |
-
f"{NY_msg}",
|
56 |
-
current_level + 1,
|
57 |
-
attempts + 1)
|
58 |
|
59 |
else:
|
60 |
return ai_response, current_level, attempts + 1
|
|
|
35 |
|
36 |
# Check if the secret word was revealed
|
37 |
if secret_word in ai_response.lower():
|
38 |
+
if current_level < len(new_year_levels):
|
39 |
return (
|
40 |
f"π You got it! The secret word for Level {current_level} was '{secret_word}'. "
|
41 |
f"Get ready for Level {current_level + 1}! π₯³",
|
|
|
52 |
return (
|
53 |
f"π You got it! The secret word for Level {current_level + 1} was '{secret_word}'. "
|
54 |
"You have completed all levels!π₯³ Here is a unique New Year message for you: "
|
55 |
+
f"{NY_msg}", current_level + 1, attempts + 1)
|
|
|
|
|
56 |
|
57 |
else:
|
58 |
return ai_response, current_level, attempts + 1
|