diff --git a/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx b/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx index 2ec57183f..b19f30833 100644 --- a/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx +++ b/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx @@ -14,7 +14,6 @@ import ModalCancelDownload from '@/containers/ModalCancelDownload' import { MainViewState } from '@/constants/screens' -import { useActiveModel } from '@/hooks/useActiveModel' import { useCreateNewThread } from '@/hooks/useCreateNewThread' import useDownloadModel from '@/hooks/useDownloadModel' import { useDownloadState } from '@/hooks/useDownloadState' @@ -24,7 +23,7 @@ import { useMainViewState } from '@/hooks/useMainViewState' import { toGibibytes } from '@/utils/converter' -import { totalRamAtom, usedRamAtom } from '@/helpers/atoms/SystemBar.atom' +import { totalRamAtom } from '@/helpers/atoms/SystemBar.atom' type Props = { model: Model @@ -38,7 +37,6 @@ const ExploreModelItemHeader: React.FC = ({ model, onClick, open }) => { const { modelDownloadStateAtom, downloadStates } = useDownloadState() const { requestCreateNewThread } = useCreateNewThread() const totalRam = useAtomValue(totalRamAtom) - const usedRam = useAtomValue(usedRamAtom) const downloadAtom = useMemo( () => atom((get) => get(modelDownloadStateAtom)[model.id]), @@ -84,33 +82,20 @@ const ExploreModelItemHeader: React.FC = ({ model, onClick, open }) => { downloadButton = } - const { activeModel } = useActiveModel() - const getLabel = (size: number) => { - const minimumRamModel = size * 1.25 - const availableRam = totalRam - usedRam + (activeModel?.metadata.size ?? 0) - - if (minimumRamModel > totalRam) { + if (size * 1.25 >= totalRam) { return ( Not enough RAM ) - } - if (minimumRamModel < availableRam) { + } else { return ( Recommended ) } - if (minimumRamModel < totalRam && minimumRamModel > availableRam) { - return ( - - Slow on your device - - ) - } } return (