Circularmachines commited on
Commit
e86e66f
1 Parent(s): 5ff37df

app.py updates

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -53,10 +53,10 @@ def get_ellipse_coords(point):# tuple[int, int]) -> tuple[int, int, int, int]):
53
  center = point
54
  radius = 16
55
  return (
56
- center[0] - radius,
57
- center[1] - radius,
58
- center[0] + radius,
59
- center[1] + 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 = np.round(value["x"]/32)*32, np.round(value["y"]/32)*32
82
 
83
  if point != st.session_state["point"]:
84
  st.session_state["point"]=point
 
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
  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