From 4266c44cbf87c69627240e136e21933badd5ec5c Mon Sep 17 00:00:00 2001 From: sumona-banerjeee Date: Mon, 2 Mar 2026 14:59:19 +0530 Subject: [PATCH] feat: align detection_mode values with backend and set yolo_vl as default. --- app/upload/page.tsx | 6 +++--- components/upload-section.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/upload/page.tsx b/app/upload/page.tsx index 5d19ad3..038d793 100644 --- a/app/upload/page.tsx +++ b/app/upload/page.tsx @@ -35,7 +35,7 @@ export default function UploadPage() { const [jsonFile, setJsonFile] = useState(null) const [speed, setSpeed] = useState(30) const [detectionType, setDetectionType] = useState("pothole-detection") - const [selectMethod, setSelectMethod] = useState("yolo") + const [selectMethod, setSelectMethod] = useState("yolo_vl") // Upload states const [uploading, setUploading] = useState(false) @@ -109,7 +109,7 @@ export default function UploadPage() { formData.append("file", file) formData.append("detection_type", detectionType) formData.append("speed_kmh", speed.toString()) - formData.append("select_method", selectMethod) + formData.append("detection_mode", selectMethod) if (jsonFile) { formData.append("json_file", jsonFile) } @@ -343,7 +343,7 @@ export default function UploadPage() { YOLO Detection Model - + YOLO with Vision-Language Model diff --git a/components/upload-section.tsx b/components/upload-section.tsx index 9bc8adf..6bf831a 100644 --- a/components/upload-section.tsx +++ b/components/upload-section.tsx @@ -24,7 +24,7 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up const [jsonFile, setJsonFile] = useState(null) const [speed, setSpeed] = useState(30) const [detectionType, setDetectionType] = useState("pothole-detection") - const [selectMethod, setSelectMethod] = useState("yolo") + const [selectMethod, setSelectMethod] = useState("yolo_vl") const [uploading, setUploading] = useState(false) const [progress, setProgress] = useState(0) const [statusMessage, setStatusMessage] = useState("") @@ -136,7 +136,7 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up formData.append("file", file) formData.append("detection_type", detectionType) formData.append("speed_kmh", speed.toString()) - formData.append("select_method", selectMethod) + formData.append("detection_mode", selectMethod) // Add JSON file if provided if (jsonFile) { @@ -324,7 +324,7 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up YOLO - +
YOLO with VL