Spaces:
Running
on
Zero
Running
on
Zero
FrancescoLR
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -151,7 +151,7 @@ def extract_middle_slices(nifti_path, output_image_path, slice_size=180, center=
|
|
151 |
plt.close()
|
152 |
|
153 |
# Function to run nnUNet inference
|
154 |
-
@spaces.GPU # Decorate the function to allocate GPU for its execution
|
155 |
def run_nnunet_predict(nifti_file):
|
156 |
# Prepare directories
|
157 |
os.makedirs(INPUT_DIR, exist_ok=True)
|
|
|
151 |
plt.close()
|
152 |
|
153 |
# Function to run nnUNet inference
|
154 |
+
@spaces.GPU(duration=70) # Decorate the function to allocate GPU for its execution
|
155 |
def run_nnunet_predict(nifti_file):
|
156 |
# Prepare directories
|
157 |
os.makedirs(INPUT_DIR, exist_ok=True)
|