da03 commited on
Commit
6146de2
·
1 Parent(s): 34e9c33
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -512,6 +512,7 @@ async def websocket_endpoint(websocket: WebSocket):
512
  # print ('predicting', f"record_10003/image_{117+len(previous_frames)}.png")
513
  print ('previous_actions', previous_actions)
514
  next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
 
515
  # Load and append the corresponding ground truth image instead of model output
516
  #print ('here4', len(previous_frames))
517
  #if DEBUG_TEACHER_FORCING:
@@ -521,8 +522,8 @@ async def websocket_endpoint(websocket: WebSocket):
521
  # assert False
522
  # previous_frames.append(next_frame_append)
523
  # pass
524
- previous_frames = []
525
- previous_actions = []
526
 
527
  # Convert the numpy array to a base64 encoded image
528
  img = Image.fromarray(next_frame)
 
512
  # print ('predicting', f"record_10003/image_{117+len(previous_frames)}.png")
513
  print ('previous_actions', previous_actions)
514
  next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
515
+ previous_frames.append(next_frame_append)
516
  # Load and append the corresponding ground truth image instead of model output
517
  #print ('here4', len(previous_frames))
518
  #if DEBUG_TEACHER_FORCING:
 
522
  # assert False
523
  # previous_frames.append(next_frame_append)
524
  # pass
525
+ #previous_frames = []
526
+ #previous_actions = []
527
 
528
  # Convert the numpy array to a base64 encoded image
529
  img = Image.fromarray(next_frame)