import { Card, Group, Progress, Stack, Text } from "@mantine/core"; export default function LoadingModelContent({ modelLoadingProgress, modelSizeInMegabytes, }: { modelLoadingProgress: number; modelSizeInMegabytes: number; }) { const isLoadingStarting = modelLoadingProgress === 0; const isLoadingComplete = modelLoadingProgress === 100; const percent = isLoadingComplete || isLoadingStarting ? 100 : modelLoadingProgress; const strokeColor = percent === 100 ? "#52c41a" : "#3385ff"; const downloadedSize = (modelSizeInMegabytes * modelLoadingProgress) / 100; const sizeText = `${downloadedSize.toFixed(0)} MB / ${modelSizeInMegabytes.toFixed(0)} MB`; return ( Loading AI... {!isLoadingStarting && ( {sizeText} {percent.toFixed(1)}% )} ); }