Spaces:
Runtime error
Runtime error
pangyuteng commited on
Commit ·
f5ac43f
1
Parent(s): d5ad1e6
added aserts for file existence checking
Browse files
app.py
CHANGED
|
@@ -66,15 +66,20 @@ def main_func(input_file_list):
|
|
| 66 |
|
| 67 |
work_dir = os.path.join(tempdir,f"work_dir")
|
| 68 |
compute_lungqia_wrapper(seri_file,tempdir,lungseg_enable=True,work_dir=work_dir)
|
| 69 |
-
assert(os.path.exists(lungqia_csv))
|
| 70 |
novsl_nifti_file = os.path.join(work_dir,"novsl.nii.gz")
|
| 71 |
wlung_nifti_file = os.path.join(work_dir,"wlung.nii.gz")
|
| 72 |
lungqia_csv = os.path.join(tempdir,"lungqia_results.csv")
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
transform_lungqia_to_mlqlf(lungqia_csv,novsl_nifti_file,wlung_nifti_file,tempdir)
|
| 75 |
mlqlf_csv_file = os.path.join(tempdir,"mlqlf.csv")
|
| 76 |
mlqlf_nifti_file = os.path.join(tempdir,"mlqlf.nii.gz")
|
|
|
|
| 77 |
assert(os.path.exists(mlqlf_csv_file))
|
|
|
|
| 78 |
|
| 79 |
my_uid = uuid.uuid4().hex
|
| 80 |
output_pdf_file = os.path.join('/tmp',f'{my_uid}.pdf')
|
|
|
|
| 66 |
|
| 67 |
work_dir = os.path.join(tempdir,f"work_dir")
|
| 68 |
compute_lungqia_wrapper(seri_file,tempdir,lungseg_enable=True,work_dir=work_dir)
|
|
|
|
| 69 |
novsl_nifti_file = os.path.join(work_dir,"novsl.nii.gz")
|
| 70 |
wlung_nifti_file = os.path.join(work_dir,"wlung.nii.gz")
|
| 71 |
lungqia_csv = os.path.join(tempdir,"lungqia_results.csv")
|
| 72 |
|
| 73 |
+
assert(os.path.exists(novsl_nifti_file))
|
| 74 |
+
assert(os.path.exists(wlung_nifti_file))
|
| 75 |
+
assert(os.path.exists(lungqia_csv))
|
| 76 |
+
|
| 77 |
transform_lungqia_to_mlqlf(lungqia_csv,novsl_nifti_file,wlung_nifti_file,tempdir)
|
| 78 |
mlqlf_csv_file = os.path.join(tempdir,"mlqlf.csv")
|
| 79 |
mlqlf_nifti_file = os.path.join(tempdir,"mlqlf.nii.gz")
|
| 80 |
+
|
| 81 |
assert(os.path.exists(mlqlf_csv_file))
|
| 82 |
+
assert(os.path.exists(mlqlf_nifti_file))
|
| 83 |
|
| 84 |
my_uid = uuid.uuid4().hex
|
| 85 |
output_pdf_file = os.path.join('/tmp',f'{my_uid}.pdf')
|