Skip to content
Snippets Groups Projects
Commit c0b3727f authored by DIANE Abderrahim's avatar DIANE Abderrahim
Browse files

update files

parent 7de6d582
No related branches found
Tags PACK-MNH-V5-3--0-09_NCL630_2
No related merge requests found
...@@ -366,6 +366,7 @@ if not pred_data.empty:# Load the model with joblib ...@@ -366,6 +366,7 @@ if not pred_data.empty:# Load the model with joblib
@st.cache_data(show_spinner =False) @st.cache_data(show_spinner =False)
def tempdir(change): def tempdir(change):
from tempfile import TemporaryDirectory
with TemporaryDirectory( prefix="results", dir="./report") as temp_dir:# create a temp directory with TemporaryDirectory( prefix="results", dir="./report") as temp_dir:# create a temp directory
tempdirname = os.path.split(temp_dir)[1] tempdirname = os.path.split(temp_dir)[1]
if len(os.listdir('./report/out/figures/'))==3: if len(os.listdir('./report/out/figures/'))==3:
...@@ -381,7 +382,7 @@ if not pred_data.empty:# Load the model with joblib ...@@ -381,7 +382,7 @@ if not pred_data.empty:# Load the model with joblib
st.download_button(label = 'Download', data = zip_data, file_name = f'Nirs_Workflow_{date_time}_Pred_.zip', mime ="application/zip", st.download_button(label = 'Download', data = zip_data, file_name = f'Nirs_Workflow_{date_time}_Pred_.zip', mime ="application/zip",
args = None, kwargs = None,type = "primary",use_container_width = True) args = None, kwargs = None,type = "primary",use_container_width = True)
except: except:
st.write('rtt') st.write('-')
# except: # except:
# c2.error('''Error: Data loading failed. Please check your file. Consider fine-tuning the dialect settings or ensure the file isn't corrupted.''') # c2.error('''Error: Data loading failed. Please check your file. Consider fine-tuning the dialect settings or ensure the file isn't corrupted.''')
...@@ -389,4 +390,4 @@ if not pred_data.empty:# Load the model with joblib ...@@ -389,4 +390,4 @@ if not pred_data.empty:# Load the model with joblib
else: else:
with c2: with c2:
if new_data: if new_data:
st.error("Error!:The The data you provided for making predictions doesn't appear to be multivariable.!") st.error("Error!:The The data you provided for making predictions doesn't appear to be multivariable.!")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment