design fix and select optimizations
This commit is contained in:
@@ -23,6 +23,20 @@ import { storeVideoFile } from "@/lib/video-storage"
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
const WS_URL = API_URL?.replace(/^https:\/\//, "wss://").replace(/^http:\/\//, "ws://")
|
||||
|
||||
const DETECTION_TYPES = [
|
||||
{ value: "pothole-detection", label: "Pothole Detection" },
|
||||
{ value: "sign-board-detection", label: "Signboard Detection" },
|
||||
{ value: "pot-sign-detection", label: "Pothole & Signboard Detection" },
|
||||
] as const
|
||||
|
||||
const DETECTION_METHODS = [
|
||||
{ value: "yolo", label: "YOLO Detection Model" },
|
||||
{ value: "yolo_vl", label: "YOLO with Vision-Language Model" },
|
||||
{ value: "sam3", label: "OpenAI SAM 3 Segmentation Model" },
|
||||
{ value: "yoloe", label: "YOLOE Open-Vocabulary Detection" },
|
||||
{ value: "yoloe_trained_vl", label: "YOLOE With Vision Language Model" },
|
||||
] as const
|
||||
|
||||
type DetectionType = "pothole-detection" | "sign-board-detection" | "pot-sign-detection"
|
||||
|
||||
|
||||
@@ -264,15 +278,11 @@ export default function UploadPage() {
|
||||
<SelectValue placeholder="Select detection type" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="pothole-detection">
|
||||
<span className="font-medium">Pothole Detection</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="sign-board-detection">
|
||||
<span className="font-medium">Signboard Detection</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="pot-sign-detection">
|
||||
<span className="font-medium">Pothole & Signboard Detection</span>
|
||||
</SelectItem>
|
||||
{DETECTION_TYPES.map((type) => (
|
||||
<SelectItem key={type.value} value={type.value}>
|
||||
<span className="font-medium">{type.label}</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -308,21 +318,11 @@ export default function UploadPage() {
|
||||
<SelectValue placeholder="Select method" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="yolo">
|
||||
<span className="font-medium">YOLO Detection Model</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="yolo_vl">
|
||||
<span className="font-medium">YOLO with Vision-Language Model</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="sam3">
|
||||
<span className="font-medium">OpenAI SAM 3 Segmentation Model</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="yoloe">
|
||||
<span className="font-medium">YOLOE Open-Vocabulary Detection</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="yoloe_trained_vl">
|
||||
<span className="font-medium">YOLOE With Vision Language Model</span>
|
||||
</SelectItem>
|
||||
{DETECTION_METHODS.map((method) => (
|
||||
<SelectItem key={method.value} value={method.value}>
|
||||
<span className="font-medium">{method.label}</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user