FrancescoLR commited on
Commit
7a2ca4b
·
1 Parent(s): ed9fa70

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -31,8 +31,12 @@ def run_nnunet_predict(nifti_file):
31
  os.makedirs(OUTPUT_DIR, exist_ok=True)
32
 
33
  # Save the uploaded file to the input directory
34
- input_path = os.path.join(INPUT_DIR, "image.nii.gz")
35
  os.rename(nifti_file.name, input_path) # Move the uploaded file to the expected input location
 
 
 
 
36
 
37
  # Set environment variables for nnUNet
38
  os.environ["nnUNet_results"] = MODEL_DIR
 
31
  os.makedirs(OUTPUT_DIR, exist_ok=True)
32
 
33
  # Save the uploaded file to the input directory
34
+ input_path = os.path.join(INPUT_DIR, "image_0000.nii.gz")
35
  os.rename(nifti_file.name, input_path) # Move the uploaded file to the expected input location
36
+
37
+ # Debugging: List files in the /tmp/input directory
38
+ print("Files in /tmp/input:")
39
+ print(os.listdir(INPUT_DIR))
40
 
41
  # Set environment variables for nnUNet
42
  os.environ["nnUNet_results"] = MODEL_DIR