Hello everyone. I now create a web app and I want to ask about how to upload PDFs from my laptop/local to Document AI?
with open(file_path, "rb") as image:
image_content = image.read()
uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
process_document_sample(
project_id="XXXX",
location="us",
processor_id="XXX",
file_path=uploaded_file,
mime_type="application/pdf"
)
I want upload PDF from local/my laptop use Streamlit (uploaded_file) and can read my PDF with with open(file_path, "rb") as image function?