Hi Shraavani thank you so much for your reply
. I have been able to get my deployed app working because of your suggestions ![]()
![]()
.
The major difference was I had the incorrect IAM permission set on my service account - I set it as “Document AI Admin” - however, your clear concise explanation and examples were also a major help.
I wasn’t sure how to connect to the credentials once I entered them in the st App settings/Secrets, so I used the following code:
import streamlit as st
from google.cloud import documentai
from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_info(
st.secrets["gcs_connections"]
client = documentai.DocumentProcessorServiceClient(credentials=credentials)
where “gcs_connections” is the TOML section for the GCS auth crednetials in Secrets https://docs.streamlit.io/streamlit-community-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management
Thank you so much once again ![]()
Cheers