Spaces:
Runtime error
Runtime error
Sasha Rush
commited on
Commit
·
23eb24d
1
Parent(s):
36b5ada
leaderboard
Browse files
app.py
CHANGED
@@ -238,7 +238,7 @@ def draw_board(grid, num=0):
|
|
238 |
canvas = canvas.center_xy().frame(0.5)
|
239 |
canvas = rectangle(canvas.get_envelope().width, canvas.get_envelope().height).line_width(0.5).fill_color(Color("orange")) + canvas
|
240 |
canvas.render_svg(f"pic{num}.svg", 256)
|
241 |
-
canvas.render(f"pic{num}.png",
|
242 |
return canvas
|
243 |
|
244 |
|
@@ -445,8 +445,7 @@ def move(board, action, old_pos):
|
|
445 |
# im.style(preview=True, object_fit="scale-down", columns=1, container=True)
|
446 |
msg_box = gr.HTML(label="", show_label=False)
|
447 |
|
448 |
-
output = gr.Code(label="Generating Game Code (You can also edit and rerun)", language="python", value="""def my_example():
|
449 |
-
b = Game(init=(0, 0), flag=(2, 2), walls= [], boundary= (3, 3), key= (1, 1))
|
450 |
p = (0, 0)
|
451 |
# This is the code you want it to generate.
|
452 |
p = move(b, "DR", p)
|
|
|
238 |
canvas = canvas.center_xy().frame(0.5)
|
239 |
canvas = rectangle(canvas.get_envelope().width, canvas.get_envelope().height).line_width(0.5).fill_color(Color("orange")) + canvas
|
240 |
canvas.render_svg(f"pic{num}.svg", 256)
|
241 |
+
canvas.render(f"pic{num}.png", 500)
|
242 |
return canvas
|
243 |
|
244 |
|
|
|
445 |
# im.style(preview=True, object_fit="scale-down", columns=1, container=True)
|
446 |
msg_box = gr.HTML(label="", show_label=False)
|
447 |
|
448 |
+
output = gr.Code(label="Generating Game Code (You can also edit and rerun)", language="python", value="""def my_example(b):
|
|
|
449 |
p = (0, 0)
|
450 |
# This is the code you want it to generate.
|
451 |
p = move(b, "DR", p)
|