Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ app = FastAPI()
|
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
|
16 |
# 🟢 Tải model DPT-Hybrid thay cho ZoeDepth để tăng tốc
|
17 |
-
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-hybrid")
|
18 |
-
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-hybrid").to(device)
|
19 |
model.eval()
|
20 |
|
21 |
@app.post("/analyze_path/")
|
|
|
14 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
|
16 |
# 🟢 Tải model DPT-Hybrid thay cho ZoeDepth để tăng tốc
|
17 |
+
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-hybrid-midas")
|
18 |
+
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-hybrid-midas").to(device)
|
19 |
model.eval()
|
20 |
|
21 |
@app.post("/analyze_path/")
|