Aswini96 commited on
Commit
a12f885
Β·
verified Β·
1 Parent(s): db1821f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,8 +27,8 @@ def ask_gemini(prompt, secret_word):
27
  # Function to handle game logic
28
  def jailbreak_game(user_prompt, current_level, attempts):
29
  # Determine the secret word for the current level
30
- # if current_level >= len(new_year_levels):
31
- # return ("Congratulations! πŸŽ‰ You have completed all levels. ", current_level, attempts)
32
 
33
  secret_word = new_year_levels[current_level - 1]
34
  ai_response = ask_gemini(user_prompt, secret_word)
@@ -52,7 +52,7 @@ def jailbreak_game(user_prompt, current_level, attempts):
52
  return (
53
  f"πŸŽ‰ You got it! The secret word for Level {current_level} was '{secret_word}'. "
54
  "You have completed all levels!πŸ₯³ Here is a unique New Year message for you: "
55
- f"{NY_msg}", current_level, attempts + 1)
56
 
57
  else:
58
  return ai_response, current_level, attempts + 1
 
27
  # Function to handle game logic
28
  def jailbreak_game(user_prompt, current_level, attempts):
29
  # Determine the secret word for the current level
30
+ if current_level > len(new_year_levels):
31
+ return ("Congratulations! πŸŽ‰ You have completed all levels. ", current_level, attempts)
32
 
33
  secret_word = new_year_levels[current_level - 1]
34
  ai_response = ask_gemini(user_prompt, secret_word)
 
52
  return (
53
  f"πŸŽ‰ You got it! The secret word for Level {current_level} 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