Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
d249772
1
Parent(s):
c94bfc7
main.py
CHANGED
|
@@ -375,6 +375,12 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 375 |
'N + 0 3 0 7 : + 0 3 3 2', 'N + 0 2 2 0 : + 0 3 7 1',
|
| 376 |
'N + 0 0 8 2 : + 0 1 5 1']
|
| 377 |
#positions = positions[:4]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
try:
|
| 379 |
while True:
|
| 380 |
try:
|
|
@@ -402,7 +408,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 402 |
positions = positions[1:]
|
| 403 |
x, y, action_type = parse_action_string(position)
|
| 404 |
mouse_position = (x, y)
|
| 405 |
-
if
|
| 406 |
previous_actions.append((action_type, mouse_position))
|
| 407 |
#previous_actions = [(action_type, mouse_position)]
|
| 408 |
|
|
@@ -422,7 +428,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 422 |
elif True:
|
| 423 |
assert False
|
| 424 |
previous_frames.append(next_frame_append)
|
| 425 |
-
|
| 426 |
|
| 427 |
# Convert the numpy array to a base64 encoded image
|
| 428 |
img = Image.fromarray(next_frame)
|
|
|
|
| 375 |
'N + 0 3 0 7 : + 0 3 3 2', 'N + 0 2 2 0 : + 0 3 7 1',
|
| 376 |
'N + 0 0 8 2 : + 0 1 5 1']
|
| 377 |
#positions = positions[:4]
|
| 378 |
+
position = positions[0]
|
| 379 |
+
positions = positions[1:]
|
| 380 |
+
x, y, action_type = parse_action_string(position)
|
| 381 |
+
mouse_position = (x, y)
|
| 382 |
+
|
| 383 |
+
previous_actions.append((action_type, mouse_position))
|
| 384 |
try:
|
| 385 |
while True:
|
| 386 |
try:
|
|
|
|
| 408 |
positions = positions[1:]
|
| 409 |
x, y, action_type = parse_action_string(position)
|
| 410 |
mouse_position = (x, y)
|
| 411 |
+
if False:
|
| 412 |
previous_actions.append((action_type, mouse_position))
|
| 413 |
#previous_actions = [(action_type, mouse_position)]
|
| 414 |
|
|
|
|
| 428 |
elif True:
|
| 429 |
assert False
|
| 430 |
previous_frames.append(next_frame_append)
|
| 431 |
+
previous_frames = []
|
| 432 |
|
| 433 |
# Convert the numpy array to a base64 encoded image
|
| 434 |
img = Image.fromarray(next_frame)
|