da03 commited on
Commit
69f42de
·
1 Parent(s): 1e63be3
Files changed (1) hide show
  1. main.py +5 -3
main.py CHANGED
@@ -368,7 +368,7 @@ async def websocket_endpoint(websocket: WebSocket):
368
  #'N + 0 2 0 5 : + 0 1 3 3']
369
  previous_actions = []
370
  for action in debug_actions[-8:]:
371
- action = action.replace('1 1', '0 4')
372
  x, y, action_type = parse_action_string(action)
373
  previous_actions.append((action_type, (x, y)))
374
  positions = [
@@ -440,6 +440,8 @@ async def websocket_endpoint(websocket: WebSocket):
440
  previous_actions.append((action_type, mouse_position))
441
  #previous_actions = [(action_type, mouse_position)]
442
  if not DEBUG_TEACHER_FORCING:
 
 
443
  previous_actions.append((action_type, mouse_position))
444
  # Log the start time
445
  start_time = time.time()
@@ -454,8 +456,8 @@ async def websocket_endpoint(websocket: WebSocket):
454
  if True and DEBUG_TEACHER_FORCING:
455
  img = Image.open(f"record_10003/image_{117+len(previous_frames)}.png")
456
  previous_frames.append(img)
457
- elif True:
458
- assert False
459
  previous_frames.append(next_frame_append)
460
  previous_frames = []
461
 
 
368
  #'N + 0 2 0 5 : + 0 1 3 3']
369
  previous_actions = []
370
  for action in debug_actions[-8:]:
371
+ #action = action.replace('1 1', '0 4')
372
  x, y, action_type = parse_action_string(action)
373
  previous_actions.append((action_type, (x, y)))
374
  positions = [
 
440
  previous_actions.append((action_type, mouse_position))
441
  #previous_actions = [(action_type, mouse_position)]
442
  if not DEBUG_TEACHER_FORCING:
443
+ x, y = mouse_position
444
+ mouse_position = (x//8, y//8)
445
  previous_actions.append((action_type, mouse_position))
446
  # Log the start time
447
  start_time = time.time()
 
456
  if True and DEBUG_TEACHER_FORCING:
457
  img = Image.open(f"record_10003/image_{117+len(previous_frames)}.png")
458
  previous_frames.append(img)
459
+ else:
460
+ #assert False
461
  previous_frames.append(next_frame_append)
462
  previous_frames = []
463