FrancescoLR commited on
Commit
cf79142
·
verified ·
1 Parent(s): 6359287

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -14
app.py CHANGED
@@ -1,16 +1,3 @@
1
- import subprocess
2
- import sys
3
-
4
- print("Installing mednextv1...")
5
- subprocess.run([sys.executable, "-m", "pip", "install", "--force-reinstall", "git+https://github.com/FrancescoLR/MedNeXt.git"])
6
-
7
- try:
8
- from mednextv1 import create_mednext_encoder_v1
9
- print("Successfully imported mednextv1!")
10
- except ModuleNotFoundError:
11
- print("ERROR: mednextv1 still not found after reinstalling!")
12
-
13
-
14
  import gradio as gr
15
  import torch
16
  import numpy as np
@@ -21,7 +8,7 @@ import torch.nn as nn
21
  from huggingface_hub import hf_hub_download
22
  from monai.transforms import Compose, LoadImaged, Spacingd, CropForegroundd, SpatialPadd, CenterSpatialCropd
23
  from monai.data import Dataset
24
- from mednextv1 import create_mednext_encoder_v1
25
 
26
  # Device selection
27
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import torch
3
  import numpy as np
 
8
  from huggingface_hub import hf_hub_download
9
  from monai.transforms import Compose, LoadImaged, Spacingd, CropForegroundd, SpatialPadd, CenterSpatialCropd
10
  from monai.data import Dataset
11
+ from nnunet_mednext import create_mednext_encoder_v1
12
 
13
  # Device selection
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")