Circularmachines
commited on
Commit
•
b2b0a36
1
Parent(s):
050e5aa
app.py updates
Browse files
app.py
CHANGED
@@ -31,6 +31,12 @@ if "points" not in st.session_state:
|
|
31 |
r=0#np.random.randint(100)
|
32 |
current_image=ds[0]['image']
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
with ds[r]['image'] as img:
|
36 |
draw = ImageDraw.Draw(img)
|
@@ -63,10 +69,6 @@ with ds[r]['image'] as img:
|
|
63 |
|
64 |
st.button('Random frame', on_click=button_click)
|
65 |
|
66 |
-
|
67 |
-
r=np.random.randint(100)
|
68 |
-
#current_image=ds[r]['image']
|
69 |
-
st.write(str(r))
|
70 |
-
st.session_state["points"] = []
|
71 |
#else:
|
72 |
# st.write('Gohuhuhubye')
|
|
|
31 |
r=0#np.random.randint(100)
|
32 |
current_image=ds[0]['image']
|
33 |
|
34 |
+
def button_click():
|
35 |
+
r=np.random.randint(100)
|
36 |
+
#current_image=ds[r]['image']
|
37 |
+
st.write(str(r))
|
38 |
+
st.session_state["points"] = []
|
39 |
+
|
40 |
|
41 |
with ds[r]['image'] as img:
|
42 |
draw = ImageDraw.Draw(img)
|
|
|
69 |
|
70 |
st.button('Random frame', on_click=button_click)
|
71 |
|
72 |
+
|
|
|
|
|
|
|
|
|
73 |
#else:
|
74 |
# st.write('Gohuhuhubye')
|