da03 commited on
Commit
fd3598c
·
1 Parent(s): c815936
Files changed (1) hide show
  1. main.py +4 -1
main.py CHANGED
@@ -133,6 +133,7 @@ def draw_trace(image: np.ndarray, previous_actions: List[Tuple[str, List[int]]],
133
  if not DEBUG_TEACHER_FORCING:
134
  x_current = x_current *8
135
  y_current = y_current *8
 
136
  draw.ellipse([x_current-3, y_current-3, x_current+3, y_current+3], fill=(0, 255, 0))
137
 
138
  return np.array(pil_image)
@@ -442,9 +443,11 @@ async def websocket_endpoint(websocket: WebSocket):
442
 
443
  action_type = data.get("action_type")
444
  mouse_position = data.get("mouse_position")
445
- if np.random.random() < 0.7:
446
  print ('setting left click')
447
  action_type = 'left_click'
 
 
448
 
449
 
450
  # Store the actions
 
133
  if not DEBUG_TEACHER_FORCING:
134
  x_current = x_current *8
135
  y_current = y_current *8
136
+ print ('x_current, y_current', x_current, y_current)
137
  draw.ellipse([x_current-3, y_current-3, x_current+3, y_current+3], fill=(0, 255, 0))
138
 
139
  return np.array(pil_image)
 
443
 
444
  action_type = data.get("action_type")
445
  mouse_position = data.get("mouse_position")
446
+ if np.random.random() < 0.9:
447
  print ('setting left click')
448
  action_type = 'left_click'
449
+ else:
450
+ print ('not setting left click')
451
 
452
 
453
  # Store the actions