Spaces:
Runtime error
Runtime error
Commit
·
7a83d85
1
Parent(s):
ce6d450
Update main.py
Browse files
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"{
|
59 |
-
prompt = "
|
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)
|