yuntian-deng commited on
Commit
704eccb
·
1 Parent(s): 33a9da7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +11 -1
main.py CHANGED
@@ -56,7 +56,17 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
56
 
57
 
58
  # Prepare the prompt based on the previous actions
59
- action_descriptions = [f"{pos[0]}:{pos[1]}" for _, pos in previous_actions[-7:]]
 
 
 
 
 
 
 
 
 
 
60
  prompt = " ".join(action_descriptions)
61
 
62
  # Generate the next frame
 
56
 
57
 
58
  # Prepare the prompt based on the previous actions
59
+ #action_descriptions = [f"{pos[0]}:{pos[1]}" for _, pos in previous_actions[-7:]]
60
+ #prompt = " ".join(action_descriptions)
61
+ action_descriptions = []
62
+ for action_type, pos in previous_actions[-7:]:
63
+ if action_type == "move":
64
+ action_descriptions.append(f"{pos[0]}:{pos[1]}")
65
+ elif action_type == "left_click":
66
+ action_descriptions.append("left_click")
67
+ elif action_type == "right_click":
68
+ action_descriptions.append("right_click")
69
+
70
  prompt = " ".join(action_descriptions)
71
 
72
  # Generate the next frame