st.error('Error: The xfile has not been loaded successfully, please consider tuning the dialect settings!')
else:
st.info('Info: Insert your spectral data file above!')
# Load Y-block data
ycal_csv=st.file_uploader("Select corresponding Chemical Data",type="csv",help=" :mushroom: select a csv matrix with samples as rows and chemical values as a column")
st.error('Error: The format of the X-file does not correspond to the expected dialect settings. To read the file correctly, please adjust the separator parameters.')
spectra=DataFrame(spectra).astype(float)
# prepare y data
try:
chem_data,idx=col_cat(yfile)
except:
st.error('Error: The format of the Y-file does not correspond to the expected dialect settings. To read the file correctly, please adjust the separator parameters.')