Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ app = FastAPI()
|
|
12 |
|
13 |
# 🟢 Tải mô hình ZoeDepth từ Hugging Face
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
-
image_processor = AutoImageProcessor.from_pretrained("
|
16 |
-
model = ZoeDepthForDepthEstimation.from_pretrained("
|
17 |
model.eval()
|
18 |
|
19 |
@app.post("/analyze_path/")
|
|
|
12 |
|
13 |
# 🟢 Tải mô hình ZoeDepth từ Hugging Face
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
+
image_processor = AutoImageProcessor.from_pretrained("isl-org/ZoeD_NK_S", use_fast=True)
|
16 |
+
model = ZoeDepthForDepthEstimation.from_pretrained("isl-org/ZoeD_NK_S").to(device)
|
17 |
model.eval()
|
18 |
|
19 |
@app.post("/analyze_path/")
|