AdritRao commited on
Commit
97f584b
·
1 Parent(s): f79cc39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -5,6 +5,7 @@ import zipfile
5
  import os
6
  import subprocess
7
  from datetime import datetime
 
8
 
9
  # Flag to track if subprocess commands have been executed
10
  subprocess_executed = False
@@ -128,5 +129,7 @@ if uploaded_zip_file is not None:
128
 
129
  except Exception as e:
130
  st.error(f"Error: {str(e)}")
 
 
131
 
132
  st.write("Upload a ZIP file containing DICOM slices to view the images.")
 
5
  import os
6
  import subprocess
7
  from datetime import datetime
8
+ import shutil
9
 
10
  # Flag to track if subprocess commands have been executed
11
  subprocess_executed = False
 
129
 
130
  except Exception as e:
131
  st.error(f"Error: {str(e)}")
132
+ finally:
133
+ shutil.rmtree(temp_dir)
134
 
135
  st.write("Upload a ZIP file containing DICOM slices to view the images.")