Update app.py
Browse files
app.py
CHANGED
|
@@ -14,14 +14,6 @@ from PIL import Image, ImageFilter
|
|
| 14 |
from torchvision import transforms
|
| 15 |
from transformers import AutoModelForImageSegmentation, AutoImageProcessor, AutoModelForDepthEstimation
|
| 16 |
|
| 17 |
-
# Verify kornia and timm are available
|
| 18 |
-
try:
|
| 19 |
-
import kornia
|
| 20 |
-
import timm
|
| 21 |
-
print("kornia and timm are successfully installed!")
|
| 22 |
-
except ImportError as e:
|
| 23 |
-
print(f"Error: {e}")
|
| 24 |
-
|
| 25 |
# Set device and precision
|
| 26 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 27 |
torch.set_float32_matmul_precision('high')
|
|
|
|
| 14 |
from torchvision import transforms
|
| 15 |
from transformers import AutoModelForImageSegmentation, AutoImageProcessor, AutoModelForDepthEstimation
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Set device and precision
|
| 18 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 19 |
torch.set_float32_matmul_precision('high')
|