Circularmachines commited on
Commit
de70cb6
·
1 Parent(s): e86e66f

app.py updates

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -51,12 +51,12 @@ def find():
51
 
52
  def get_ellipse_coords(point):# tuple[int, int]) -> tuple[int, int, int, int]):
53
  center = point
54
- radius = 16
55
  return (
56
  center[0] ,
57
  center[1] ,
58
- center[0] + 2*radius,
59
- center[1] + 2*radius,
60
  )
61
 
62
 
@@ -78,7 +78,7 @@ with col1:
78
  value = streamlit_image_coordinates(current_image, key="pil")
79
 
80
  if value is not None:
81
- point = value["x"]//32*32, value["y"]//32*32
82
 
83
  if point != st.session_state["point"]:
84
  st.session_state["point"]=point
 
51
 
52
  def get_ellipse_coords(point):# tuple[int, int]) -> tuple[int, int, int, int]):
53
  center = point
54
+ patch_size = 16
55
  return (
56
  center[0] ,
57
  center[1] ,
58
+ center[0] + patch_size,
59
+ center[1] + patch_size,
60
  )
61
 
62
 
 
78
  value = streamlit_image_coordinates(current_image, key="pil")
79
 
80
  if value is not None:
81
+ point = value["x"]//16*16, value["y"]//16*16
82
 
83
  if point != st.session_state["point"]:
84
  st.session_state["point"]=point