greencatted commited on
Commit
aa652b2
1 Parent(s): 6d601f6

Camera input

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,4 +1,7 @@
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
1
  import streamlit as st
2
 
3
+ enable = st.checkbox("Enable camera")
4
+ picture = st.camera_input("Take a picture", disabled=not enable)
5
+
6
+ if picture:
7
+ st.image(picture)