yuntian-deng commited on
Commit
7a83d85
·
1 Parent(s): ce6d450

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -55,8 +55,8 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
55
  image_sequence_tensor = image_sequence_tensor.unsqueeze(0).to(device)
56
 
57
  # Prepare the prompt based on the previous actions
58
- action_descriptions = [f"{action} at ({pos[0]}, {pos[1]})" for action, pos in previous_actions[-7:]]
59
- prompt = "A sequence of actions: " + ", ".join(action_descriptions)
60
 
61
  # Generate the next frame
62
  new_frame = sample_frame(model, prompt, image_sequence_tensor)
 
55
  image_sequence_tensor = image_sequence_tensor.unsqueeze(0).to(device)
56
 
57
  # Prepare the prompt based on the previous actions
58
+ action_descriptions = [f"{pos[0]}:{pos[1]}" for _, pos in previous_actions[-7:]]
59
+ prompt = " ".join(action_descriptions)
60
 
61
  # Generate the next frame
62
  new_frame = sample_frame(model, prompt, image_sequence_tensor)