TypeError expected str, bytes or os.PathLike object, not UploadedFile

I have read previous threads with same TypeError but seems there’s no solution to this error while using streamlit. Here’s my code and error:

myapp.py:

model_prediction.py :