Commit
·
de70cb6
1
Parent(s):
e86e66f
app.py updates
Browse files
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 |
-
|
55 |
return (
|
56 |
center[0] ,
|
57 |
center[1] ,
|
58 |
-
center[0] +
|
59 |
-
center[1] +
|
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"]//
|
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
|