Spaces:
Sleeping
Sleeping
update
Browse files- model_factory.py +2 -0
- models/ram.py +0 -2
model_factory.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
import torch
|
| 2 |
from models.ram import RAM
|
| 3 |
|
|
|
|
|
|
|
| 4 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 5 |
|
| 6 |
def get_model():
|
|
|
|
| 1 |
import torch
|
| 2 |
from models.ram import RAM
|
| 3 |
|
| 4 |
+
from huggingface_hub import hf_hub_download
|
| 5 |
+
|
| 6 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 7 |
|
| 8 |
def get_model():
|
models/ram.py
CHANGED
|
@@ -7,8 +7,6 @@ from deepinv.physics import Physics, LinearPhysics, Downsampling
|
|
| 7 |
from deepinv.utils import TensorList
|
| 8 |
from deepinv.utils.tensorlist import TensorList
|
| 9 |
|
| 10 |
-
from huggingface_hub import hf_hub_download
|
| 11 |
-
|
| 12 |
cuda = True if torch.cuda.is_available() else False
|
| 13 |
Tensor = torch.cuda.FloatTensor if cuda else torch.FloatTensor
|
| 14 |
|
|
|
|
| 7 |
from deepinv.utils import TensorList
|
| 8 |
from deepinv.utils.tensorlist import TensorList
|
| 9 |
|
|
|
|
|
|
|
| 10 |
cuda = True if torch.cuda.is_available() else False
|
| 11 |
Tensor = torch.cuda.FloatTensor if cuda else torch.FloatTensor
|
| 12 |
|