Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,8 +19,11 @@ def greet(original_string):
|
|
| 19 |
b = backgammon.Backgammon(part1, part2)
|
| 20 |
|
| 21 |
# Generate plays and return moves
|
| 22 |
-
for play in b.generate_plays()
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
# Ensure the inputs and outputs match what `greet` returns
|
| 26 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 19 |
b = backgammon.Backgammon(part1, part2)
|
| 20 |
|
| 21 |
# Generate plays and return moves
|
| 22 |
+
moves = [play.moves for play in b.generate_plays()]
|
| 23 |
+
if not moves: # If no moves are generated
|
| 24 |
+
return "No moves available."
|
| 25 |
+
|
| 26 |
+
return moves[0] # Return the first move as an example
|
| 27 |
|
| 28 |
# Ensure the inputs and outputs match what `greet` returns
|
| 29 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|