FrancescoLR commited on
Commit
60723f6
·
1 Parent(s): c02fad1

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -15,16 +15,13 @@ OUTPUT_DIR = "/tmp/output"
15
  # Hugging Face Model Repository
16
  REPO_ID = "FrancescoLR/FLAMeS-model" # Replace with your actual model repository ID
17
 
18
- # Function to download the model files from Hugging Face Model Hub
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.zip", cache_dir=MODEL_DIR)
24
- # Unzip the dataset into the correct location
25
- subprocess.run(["unzip", "-o", os.path.join(MODEL_DIR, "Dataset004_WML.zip"), "-d", DATASET_DIR])
26
- os.remove(os.path.join(MODEL_DIR, "Dataset004_WML.zip"))
27
- print("Dataset004_WML downloaded and extracted.")
28
 
29
  # Function to run nnUNet inference
30
  def run_nnunet_predict(nifti_file):
 
15
  # Hugging Face Model Repository
16
  REPO_ID = "FrancescoLR/FLAMeS-model" # Replace with your actual model repository ID
17
 
18
+ # Function to download the Dataset004_WML folder
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
+ print("Dataset004_WML downloaded.")
 
 
 
25
 
26
  # Function to run nnUNet inference
27
  def run_nnunet_predict(nifti_file):