refactor: change analysis to upload
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
'use client';
|
||||
|
||||
import { FormField, SelectPopover } from '@/components/form';
|
||||
|
||||
const options = [
|
||||
{ value: 'yolo', label: 'Road Defect Detection' },
|
||||
{ value: 'yoloe', label: 'YOLOE Open-Vocabulary Detection' },
|
||||
{ value: 'yoloe_trained_vl', label: 'YOLOE With Vision Language Model' },
|
||||
{ value: 'culvert_detection', label: 'Culvert Detection' },
|
||||
{ value: 'combined', label: 'Road Defect Detection with vl' },
|
||||
] as const;
|
||||
|
||||
interface UploadSettingsSectionProps {
|
||||
value: string;
|
||||
onValueChange: (value: string) => void;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export function UploadSettingsSection({
|
||||
value,
|
||||
onValueChange,
|
||||
disabled = false,
|
||||
}: UploadSettingsSectionProps) {
|
||||
return (
|
||||
<section className="space-y-3">
|
||||
<div>
|
||||
<h2 className="text-sm font-semibold text-foreground">
|
||||
Upload Settings
|
||||
</h2>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Select the detection workflow for this upload.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<FormField id="detection-method" label="Detection Method">
|
||||
<SelectPopover
|
||||
options={options}
|
||||
value={value}
|
||||
onValueChange={onValueChange}
|
||||
disabled={disabled}
|
||||
placeholder="Select method"
|
||||
searchPlaceholder="Search methods"
|
||||
emptyMessage="No methods found."
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user