Spaces:
Running
on
Zero
Running
on
Zero
FrancescoLR
commited on
Commit
·
e388d15
1
Parent(s):
60723f6
Updated app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,10 @@ REPO_ID = "FrancescoLR/FLAMeS-model" # Replace with your actual model repositor
|
|
19 |
def download_model():
|
20 |
if not os.path.exists(DATASET_DIR):
|
21 |
os.makedirs(DATASET_DIR, exist_ok=True)
|
22 |
-
print("Downloading Dataset004_WML...")
|
23 |
-
hf_hub_download(repo_id=REPO_ID, filename="Dataset004_WML", cache_dir=MODEL_DIR)
|
24 |
-
|
|
|
25 |
|
26 |
# Function to run nnUNet inference
|
27 |
def run_nnunet_predict(nifti_file):
|
|
|
19 |
def download_model():
|
20 |
if not os.path.exists(DATASET_DIR):
|
21 |
os.makedirs(DATASET_DIR, exist_ok=True)
|
22 |
+
print("Downloading Dataset004_WML.zip...")
|
23 |
+
zip_path = hf_hub_download(repo_id=REPO_ID, filename="Dataset004_WML.zip", cache_dir=MODEL_DIR)
|
24 |
+
subprocess.run(["unzip", "-o", zip_path, "-d", MODEL_DIR])
|
25 |
+
print("Dataset004_WML downloaded and extracted.")
|
26 |
|
27 |
# Function to run nnUNet inference
|
28 |
def run_nnunet_predict(nifti_file):
|