gouravgujariya commited on
Commit
614d793
Β·
verified Β·
1 Parent(s): 6af6b08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,7 +60,7 @@ def emoji_game(user_input=""):
60
  response_text = response[0]['generated_text'] if response and isinstance(response, list) and len(response) > 0 else "❓"
61
 
62
  # Process response: if it's correct, increase points; otherwise, decrease points
63
- if "correct" in response_text.lower(): # Correct guess
64
  points += 1
65
  if points >= 10:
66
  return f"πŸŽ‰ Correct! You've reached 10 points! You win the game! πŸ†"
@@ -89,5 +89,5 @@ with gr.Blocks() as interface:
89
  start_button.click(reset_game, outputs=output)
90
  next_button.click(lambda: emoji_game(), outputs=output)
91
 
92
- # Launch the Gradio interface
93
- interface.launch()
 
60
  response_text = response[0]['generated_text'] if response and isinstance(response, list) and len(response) > 0 else "❓"
61
 
62
  # Process response: if it's correct, increase points; otherwise, decrease points
63
+ if isinstance(response_text, str) and "correct" in response_text.lower(): # Correct guess
64
  points += 1
65
  if points >= 10:
66
  return f"πŸŽ‰ Correct! You've reached 10 points! You win the game! πŸ†"
 
89
  start_button.click(reset_game, outputs=output)
90
  next_button.click(lambda: emoji_game(), outputs=output)
91
 
92
+ # Launch the Gradio interface with share option
93
+ interface.launch(share=True)