Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
b403864
1
Parent(s):
faaf598
main.py
CHANGED
|
@@ -82,7 +82,9 @@ def create_position_and_click_map(pos,action_type, image_height=48, image_width=
|
|
| 82 |
leftclick_map = torch.zeros((1, image_height, image_width))
|
| 83 |
if action_type == 'L':
|
| 84 |
print ('left click', x_scaled, y_scaled)
|
| 85 |
-
|
|
|
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
return pos_map, leftclick_map, x_scaled, y_scaled
|
|
@@ -285,8 +287,8 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
|
|
| 285 |
#prompt = ''
|
| 286 |
#prompt = "1~1 0~0 0~0 0~0 0~0 0~0 0~0 0~0"
|
| 287 |
print(prompt)
|
| 288 |
-
prompt = prompt.replace('L', 'N')
|
| 289 |
-
print ('changing L to N')
|
| 290 |
|
| 291 |
# Generate the next frame
|
| 292 |
new_frame = sample_frame(model, prompt, image_sequence_tensor, pos_maps=pos_maps, leftclick_maps=leftclick_maps)
|
|
|
|
| 82 |
leftclick_map = torch.zeros((1, image_height, image_width))
|
| 83 |
if action_type == 'L':
|
| 84 |
print ('left click', x_scaled, y_scaled)
|
| 85 |
+
print ('skipped')
|
| 86 |
+
if False:
|
| 87 |
+
leftclick_map[0, y_scaled, x_scaled] = 1.0
|
| 88 |
|
| 89 |
|
| 90 |
return pos_map, leftclick_map, x_scaled, y_scaled
|
|
|
|
| 287 |
#prompt = ''
|
| 288 |
#prompt = "1~1 0~0 0~0 0~0 0~0 0~0 0~0 0~0"
|
| 289 |
print(prompt)
|
| 290 |
+
#prompt = prompt.replace('L', 'N')
|
| 291 |
+
#print ('changing L to N')
|
| 292 |
|
| 293 |
# Generate the next frame
|
| 294 |
new_frame = sample_frame(model, prompt, image_sequence_tensor, pos_maps=pos_maps, leftclick_maps=leftclick_maps)
|