da03 commited on
Commit
416b9ef
·
1 Parent(s): 516fc1c
Files changed (2) hide show
  1. main.py +16 -0
  2. utils.py +1 -1
main.py CHANGED
@@ -409,6 +409,22 @@ async def websocket_endpoint(websocket: WebSocket):
409
  previous_actions.append((action_type, mouse_position))
410
  if not DEBUG_TEACHER_FORCING:
411
  previous_actions = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  try:
413
  while True:
414
  try:
 
409
  previous_actions.append((action_type, mouse_position))
410
  if not DEBUG_TEACHER_FORCING:
411
  previous_actions = []
412
+
413
+ for t in range(15): # Generate 15 actions
414
+ # Random movement
415
+ x = np.random.randint(0, 64)
416
+ y = np.random.randint(0, 48)
417
+ #x = max(0, min(63, x + dx))
418
+ #y = max(0, min(47, y + dy))
419
+
420
+ # Random click with 20% probability
421
+ if np.random.random() < 0.2:
422
+ action_type = 'L'
423
+ else:
424
+ action_type = 'N'
425
+
426
+ # Format action string
427
+ previous_actions.append((action_type, (x, y)))
428
  try:
429
  while True:
430
  try:
utils.py CHANGED
@@ -56,7 +56,7 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
56
  #time.sleep(120)
57
  print ('finished sleeping')
58
  DDPM = False
59
- DDPM = False
60
 
61
  DEBUG = True
62
  if DEBUG:
 
56
  #time.sleep(120)
57
  print ('finished sleeping')
58
  DDPM = False
59
+ DDPM = True
60
 
61
  DEBUG = True
62
  if DEBUG: