Streamlit Image Processing

I have uploaded my image onto streamlit using open cv and python.
Is there a way I can process the uploaded image?

I get this error whenever i try processing the image
TypeError: Can’t convert object of type ‘UploadedFile’ to ‘str’ for ‘filename’

Try this

uploaded_file = st.file_uploader("Choose an image")

if uploaded_file is not None:
  my_img =
  frame = np.array(my_img)