fcernafukuzaki commited on
Commit
3bc7951
·
verified ·
1 Parent(s): 2b2dcb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,6 +1,10 @@
1
  import streamlit as st
2
 
3
- picture = st.camera_input("Take a picture")
4
 
5
- if picture:
6
- st.image(picture)
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ img_file_buffer = st.camera_input("Take a picture")
4
 
5
+ if img_file_buffer is not None:
6
+ # To read image file buffer as bytes:
7
+ bytes_data = img_file_buffer.getvalue()
8
+ # Check the type of bytes_data:
9
+ # Should output: <class 'bytes'>
10
+ st.write(type(bytes_data))