diff --git a/frontend/src/pages/ModelManage.tsx b/frontend/src/pages/ModelManage.tsx index eb3e41c..1383a45 100644 --- a/frontend/src/pages/ModelManage.tsx +++ b/frontend/src/pages/ModelManage.tsx @@ -1,12 +1,11 @@ -import { Rabbit, Bird, Turtle, Settings, Share } from 'lucide-react'; +import { Rabbit, Bird, Turtle, Share } from 'lucide-react'; import { Button } from '@/components/ui/button'; -import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@/components/ui/drawer'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import ModelLineChart from '@/components/ModelLineChart'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -import { useState, useEffect } from 'react'; +import { useState } from 'react'; import ModelBarChart from '@/components/ModelBarChart'; export default function ModelManage() { @@ -27,17 +26,7 @@ export default function ModelManage() { const [lossData] = useState(dummyLossData); const [training, setTraining] = useState(false); - - useEffect(() => { - if (training) { - const socket = new WebSocket('ws://localhost:8080/ws'); - socket.onmessage = (event) => { - const data = JSON.parse(event.data); - console.log('Received data:', data); - }; - return () => socket.close(); - } - }, [training]); + const [selectedModel, setSelectedModel] = useState(null); const handleTrainingToggle = () => { setTraining((prev) => !prev); @@ -48,24 +37,6 @@ export default function ModelManage() {

모델 관리

- - - - - - - 설정 - - - -
-
+ {/* 모델 평가 탭 */} -
-
- -
-
- -
+ {/* 모델 선택 */} +
+ +
+ + {/* 선택된 모델에 따른 BarChart 및 Labeling Preview */} + {selectedModel && ( +
+
+ +
+
+ +
+
+ )} @@ -190,11 +180,22 @@ function SettingsForm() { placeholder="-1" id="batch" /> + +
@@ -244,3 +245,32 @@ function InputWithLabel({ label, id, placeholder }: InputWithLabelProps) { ); } +interface SelectWithLabelProps { + label: string; + id: string; + options: string[]; + placeholder: string; +} + +function SelectWithLabel({ label, id, options, placeholder }: SelectWithLabelProps) { + return ( +
+ + +
+ ); +}