Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import DPTForDepthEstimation, DPTImageProcessor
|
|
5 |
import gradio as gr
|
6 |
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
-
model = DPTForDepthEstimation.from_pretrained("
|
9 |
model = torch.jit.script(model)
|
10 |
processor = DPTImageProcessor.from_pretrained("Intel/dpt-swinv2-tiny-256")
|
11 |
|
|
|
5 |
import gradio as gr
|
6 |
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
+
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-swinv2-tiny-256", torch_dtype=torch.float16).to(device)
|
9 |
model = torch.jit.script(model)
|
10 |
processor = DPTImageProcessor.from_pretrained("Intel/dpt-swinv2-tiny-256")
|
11 |
|