img_file_buffer = st.camera_input("Take a picture")
if img_file_buffer is not None:
    # To read image file buffer as a 3D uint8 tensor with TensorFlow:
    bytes_data = img_file_buffer.getvalue()
    img_tensor = tf.io.decode_image(bytes_data, channels=3)
# Check the type of img_tensor:
# Should output: <class 'tensorflow.python.framework.ops.EagerTensor'>
st.write(type(img_tensor))
# Check the shape of img_tensor:
# Should output shape: (height, width, channels)
st.write(img_tensor.shape)
```
Torchvision
Ensure you have installed Torchvision (it is not bundled with PyTorch) and PyTorch.
To read the image file buffer as a 3 dimensional uint8 tensor with torchvision.io:
```python
import streamlit as st
import torch
import torchvision
img_file_buffer = st.camera_input("Take a picture")
if img_file_buffer is not None:
