Spaces:
Running
on
Zero
Running
on
Zero
FrancescoLR
commited on
Commit
·
9c5c250
1
Parent(s):
50a7b79
Updated app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def run_nnunet_predict(nifti_file):
|
|
64 |
|
65 |
# Extract the original filename without the extension
|
66 |
original_filename = os.path.basename(nifti_file.name)
|
67 |
-
base_filename = original_filename.replace(".nii.gz", "")
|
68 |
|
69 |
# Save the uploaded file to the input directory
|
70 |
input_path = os.path.join(INPUT_DIR, "image_0000.nii.gz")
|
@@ -105,7 +105,7 @@ def run_nnunet_predict(nifti_file):
|
|
105 |
extract_middle_slice(new_output_file, output_slice_path)
|
106 |
|
107 |
# Return paths for the Gradio interface
|
108 |
-
return input_slice_path, output_slice_path
|
109 |
else:
|
110 |
return "Error: Output file not found."
|
111 |
except subprocess.CalledProcessError as e:
|
|
|
64 |
|
65 |
# Extract the original filename without the extension
|
66 |
original_filename = os.path.basename(nifti_file.name)
|
67 |
+
base_filename = original_filename.replace(".nii.gz", "")
|
68 |
|
69 |
# Save the uploaded file to the input directory
|
70 |
input_path = os.path.join(INPUT_DIR, "image_0000.nii.gz")
|
|
|
105 |
extract_middle_slice(new_output_file, output_slice_path)
|
106 |
|
107 |
# Return paths for the Gradio interface
|
108 |
+
return new_output_file, input_slice_path, output_slice_path
|
109 |
else:
|
110 |
return "Error: Output file not found."
|
111 |
except subprocess.CalledProcessError as e:
|