Spaces:
Sleeping
Sleeping
test this out
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def convert(input):
|
|
10 |
|
11 |
assert path.endswith('.zip'), 'File must be a zip file'
|
12 |
|
13 |
-
os.system(f'unzip "{path}" -d "{path[:-4]}"
|
14 |
path = path[:-4]
|
15 |
files = os.listdir(path)
|
16 |
if len(files) == 1 and os.path.isdir(os.path.join(path, files[0])):
|
@@ -18,7 +18,7 @@ def convert(input):
|
|
18 |
print("Dicom folder path:", path)
|
19 |
dicom_files = os.listdir(path)
|
20 |
assert [f.endswith('.dcm') for f in dicom_files], 'Dicom folder must contain only .dcm files'
|
21 |
-
|
22 |
print("This is the list of files in the folder:", os.listdir(path))
|
23 |
|
24 |
|
|
|
10 |
|
11 |
assert path.endswith('.zip'), 'File must be a zip file'
|
12 |
|
13 |
+
os.system(f'unzip -q "{path}" -d "{path[:-4]}"')
|
14 |
path = path[:-4]
|
15 |
files = os.listdir(path)
|
16 |
if len(files) == 1 and os.path.isdir(os.path.join(path, files[0])):
|
|
|
18 |
print("Dicom folder path:", path)
|
19 |
dicom_files = os.listdir(path)
|
20 |
assert [f.endswith('.dcm') for f in dicom_files], 'Dicom folder must contain only .dcm files'
|
21 |
+
|
22 |
print("This is the list of files in the folder:", os.listdir(path))
|
23 |
|
24 |
|