diff --git a/web/app/_components/DownloadingModelTable/index.tsx b/web/app/_components/DownloadingModelTable/index.tsx
new file mode 100644
index 000000000..5ca6872f3
--- /dev/null
+++ b/web/app/_components/DownloadingModelTable/index.tsx
@@ -0,0 +1,27 @@
+import React, { Fragment } from "react";
+import { modelDownloadStateAtom } from "@/_helpers/atoms/DownloadState.atom";
+import { useAtomValue } from "jotai";
+import ModelDownloadingTable from "../ModelDownloadingTable";
+import { DownloadState } from "@/_models/DownloadState";
+
+const DownloadingModelTable: React.FC = () => {
+ const modelDownloadState = useAtomValue(modelDownloadStateAtom);
+
+ const isAnyModelDownloading = Object.values(modelDownloadState).length > 0;
+
+ if (!isAnyModelDownloading) return null;
+
+ const downloadStates: DownloadState[] = [];
+ for (const [, value] of Object.entries(modelDownloadState)) {
+ downloadStates.push(value);
+ }
+
+ return (
+
+ Downloading Models
+
+
+ );
+};
+
+export default DownloadingModelTable;
diff --git a/web/app/_components/ExploreModelContainer/index.tsx b/web/app/_components/ExploreModelContainer/index.tsx
index 88377cbf5..4c7ca636a 100644
--- a/web/app/_components/ExploreModelContainer/index.tsx
+++ b/web/app/_components/ExploreModelContainer/index.tsx
@@ -1,12 +1,8 @@
-import ExploreModelItem from "../ExploreModelItem";
import HeaderTitle from "../HeaderTitle";
import SearchBar, { SearchType } from "../SearchBar";
import SimpleCheckbox from "../SimpleCheckbox";
import SimpleTag, { TagType } from "../SimpleTag";
-import useGetHuggingFaceModel from "@/_hooks/useGetHuggingFaceModel";
-import { useAtomValue } from "jotai";
-import { modelSearchAtom } from "@/_helpers/JotaiWrapper";
-import { useEffect } from "react";
+import ExploreModelList from "../ExploreModelList";
const tags = [
"Roleplay",
@@ -19,45 +15,32 @@ const tags = [
];
const checkboxs = ["GGUF", "TensorRT", "Meow", "JigglyPuff"];
-const ExploreModelContainer: React.FC = () => {
- const modelSearch = useAtomValue(modelSearchAtom);
- const { modelList, getHuggingFaceModel } = useGetHuggingFaceModel();
-
- useEffect(() => {
- getHuggingFaceModel(modelSearch);
- }, [modelSearch]);
-
- return (
-
-
-
-
-
-
Tags
-
-
- {tags.map((item) => (
-
- ))}
-
-
-
-
-
- {modelList.map((item) => (
-
+const ExploreModelContainer: React.FC = () => (
+
+
+
+
+
+
Tags
+
+
+ {tags.map((item) => (
+
))}
+
+
+
- );
-};
+
+);
export default ExploreModelContainer;
diff --git a/web/app/_components/ExploreModelItem/index.tsx b/web/app/_components/ExploreModelItem/index.tsx
index 38fd6bd92..61ef68c47 100644
--- a/web/app/_components/ExploreModelItem/index.tsx
+++ b/web/app/_components/ExploreModelItem/index.tsx
@@ -2,12 +2,9 @@
import ExploreModelItemHeader from "../ExploreModelItemHeader";
import ModelVersionList from "../ModelVersionList";
-import { Fragment, useMemo, useState } from "react";
+import { Fragment, useState } from "react";
import SimpleTag, { TagType } from "../SimpleTag";
import { displayDate } from "@/_utils/datetime";
-import useDownloadModel from "@/_hooks/useDownloadModel";
-import { atom, useAtomValue } from "jotai";
-import { modelDownloadStateAtom } from "@/_helpers/atoms/DownloadState.atom";
import { Product } from "@/_models/Product";
type Props = {
@@ -15,21 +12,14 @@ type Props = {
};
const ExploreModelItem: React.FC
= ({ model }) => {
- const downloadAtom = useMemo(
- () => atom((get) => get(modelDownloadStateAtom)[model.name ?? ""]),
- [model.name ?? ""]
- );
- const downloadState = useAtomValue(downloadAtom);
- const { downloadModel } = useDownloadModel();
const [show, setShow] = useState(false);
return (
-
+
@@ -88,7 +78,12 @@ const ExploreModelItem: React.FC
= ({ model }) => {
{model.availableVersions.length > 0 && (
- {show && }
+ {show && (
+
+ )}