Circularmachines commited on
Commit
8015cdb
1 Parent(s): fca50af

app.py updates

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -35,11 +35,10 @@ if "draw" not in st.session_state:
35
  def button_click():
36
  st.session_state["img"]=np.random.randint(100)
37
  st.session_state["draw"] = False
38
- #current_image=ds[r]['image']
39
- #st.write(str(r))
40
- #st.session_state["points"] = (200,200)
41
- #value = streamlit_image_coordinates(current_image, key="pil")
42
-
43
 
44
  def get_ellipse_coords(point):# tuple[int, int]) -> tuple[int, int, int, int]):
45
  center = point
@@ -75,6 +74,7 @@ if value is not None:
75
 
76
 
77
  st.button('Random frame', on_click=button_click)
 
78
 
79
  st.write(st.session_state["img"])
80
  st.write(st.session_state["points"])
 
35
  def button_click():
36
  st.session_state["img"]=np.random.randint(100)
37
  st.session_state["draw"] = False
38
+
39
+ def find():
40
+ st.image(ds[st.session_state[0]]['image'])
41
+
 
42
 
43
  def get_ellipse_coords(point):# tuple[int, int]) -> tuple[int, int, int, int]):
44
  center = point
 
74
 
75
 
76
  st.button('Random frame', on_click=button_click)
77
+ st.button('Find simalar parts', on_click=find)
78
 
79
  st.write(st.session_state["img"])
80
  st.write(st.session_state["points"])