Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,6 @@ import spaces
|
|
| 10 |
from numpy import uint8, rot90, fliplr
|
| 11 |
from monai.transforms import Rotate90
|
| 12 |
|
| 13 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 14 |
-
|
| 15 |
image_base64 = utils.image_to_base64("anatomy_aware_pipeline.png")
|
| 16 |
article_html = f"<img src='data:image/png;base64,{image_base64}' alt='Anatomical pipeline illustration' style='width:100%;'>"
|
| 17 |
|
|
@@ -53,6 +51,7 @@ footer {
|
|
| 53 |
"""
|
| 54 |
@spaces.GPU(duration=20)
|
| 55 |
def predict_image(input_image, input_file):
|
|
|
|
| 56 |
|
| 57 |
if input_image is not None:
|
| 58 |
image_path = input_image
|
|
|
|
| 10 |
from numpy import uint8, rot90, fliplr
|
| 11 |
from monai.transforms import Rotate90
|
| 12 |
|
|
|
|
|
|
|
| 13 |
image_base64 = utils.image_to_base64("anatomy_aware_pipeline.png")
|
| 14 |
article_html = f"<img src='data:image/png;base64,{image_base64}' alt='Anatomical pipeline illustration' style='width:100%;'>"
|
| 15 |
|
|
|
|
| 51 |
"""
|
| 52 |
@spaces.GPU(duration=20)
|
| 53 |
def predict_image(input_image, input_file):
|
| 54 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 55 |
|
| 56 |
if input_image is not None:
|
| 57 |
image_path = input_image
|