Fixing UI 1

This commit is contained in:
AARETE\agupta
2024-06-17 17:03:37 -05:00
parent eeab019b3f
commit f06d0ff134
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -28,7 +28,7 @@ if 'file_list' not in st.session_state:
if 'show_batchID' not in st.session_state:
st.session_state.show_batchID = False
if 'landing_zone' not in st.session_state:
st.session_state.landing_zone = 'contracts_landing_zone'
st.session_state.landing_zone = 'contracts-landing-zone'
if 'batch_id' not in st.session_state:
st.session_state.batch_id = 'failed_cases'
if 'client_bucket' not in st.session_state:
@@ -116,8 +116,7 @@ file_row = st.columns([0.1, 0.8])
with file_row[0]:
st.write("**Upload Files**")
with file_row[1]:
temp_key = st.session_state.upload_key
file_list = st.file_uploader("Upload", type=['docx','tiff','pdf'], accept_multiple_files=True, label_visibility = "collapsed", help="Only PDF, TIFF and DOCX file formats are supported.", disabled=st.session_state.uploading, key = temp_key)
file_list = st.file_uploader("Upload", type=['docx','tiff','pdf'], accept_multiple_files=True, label_visibility = "collapsed", help="Only PDF, TIFF and DOCX file formats are supported.", disabled=st.session_state.uploading, key = st.session_state.upload_key)
add_vertical_space(2)
df = pd.DataFrame(columns=['Contract Name'])
@@ -151,7 +150,7 @@ with buttons[1]:
# st.write(response.text)
st.write("Internal Error. Reach out to Doczy.AI Team.")
batch_id = 'failed_cases'
landing_zone = 'contracts_landing_zone'
landing_zone = 'contracts-landing-zone'
else:
st.error("Failed")
for uploaded_file in file_list:
@@ -179,12 +178,12 @@ with buttons[1]:
landing_zone = st.session_state.landing_zone
st.write("Batch ID Created - ")
st.code(f"{batch_id}")
st.write(f"Files uploaded to s3://{client_bucket}/{landing_zone}/{batch_id}")
st.write(f"Files uploaded to s3://{client_bucket}/{landing_zone}{batch_id}")
st.session_state.show_batchID = False
st.session_state.file_list = []
st.session_state.batch_id = 'failed_cases'
st.session_state.client_bucket = 'default_bucket'
st.session_state.landing_zone = 'contracts_landing_zone'
st.session_state.landing_zone = 'contracts-landing-zone'
+1 -1
View File
@@ -93,7 +93,7 @@ client_bucket = client_s3_paths.get(client)
client_bucket = 'doczy-dev-infra-textract'
batch_objects = s3_client.list_objects_v2(Bucket=client_bucket
, Prefix="contracts_landing_zone/", Delimiter='/')
, Prefix="contracts-landing-zone/", Delimiter='/')
batch_list = []
for prefix in batch_objects['CommonPrefixes']: