Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,11 @@ from fastai.callback import *
|
|
| 9 |
import PIL
|
| 10 |
import torchvision.transforms as transforms
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 13 |
model = torch.jit.load("pract3.pth")
|
| 14 |
model = model.cpu()
|
|
|
|
| 9 |
import PIL
|
| 10 |
import torchvision.transforms as transforms
|
| 11 |
|
| 12 |
+
from huggingface_hub import hf_hub_download
|
| 13 |
+
hf_hub_download(repo_id="Alesteba/deep_model_03", filename="unet.pth")
|
| 14 |
+
|
| 15 |
+
# load model
|
| 16 |
+
|
| 17 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 18 |
model = torch.jit.load("pract3.pth")
|
| 19 |
model = model.cpu()
|