Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|