Update app.py
Browse files
app.py
CHANGED
@@ -67,6 +67,7 @@ repo_id = "paascorb/practica3_Segmentation"
|
|
67 |
learner = from_pretrained_fastai(repo_id)
|
68 |
|
69 |
def transform_image(image):
|
|
|
70 |
my_transforms = transformss.Compose([transformss.ToTensor(),
|
71 |
transformss.Normalize(
|
72 |
[0.485, 0.456, 0.406],
|
|
|
67 |
learner = from_pretrained_fastai(repo_id)
|
68 |
|
69 |
def transform_image(image):
|
70 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
71 |
my_transforms = transformss.Compose([transformss.ToTensor(),
|
72 |
transformss.Normalize(
|
73 |
[0.485, 0.456, 0.406],
|