diff --git a/app/page.tsx b/app/page.tsx
index db398b8..7440654 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -73,10 +73,6 @@ export default function Lightning() {
},
logs: true,
onQueueUpdate: (update) => {
- if (update.status === "IN_PROGRESS" && update.logs) {
- // update.logs.map((log) => log.message).forEach(console.log);
- console.log(update.logs.slice(-1)[0]?.message);
- }
if (update.status === "COMPLETED") {
inferenceTime = update.metrics.inference_time as number;
}
@@ -118,7 +114,7 @@ export default function Lightning() {
-
-
+
Compare Mode
-
+
setMode("original")}
className={cn(
- mode === "original" && "bg-neutral-200 text-black",
+ mode === "original" &&
+ "bg-neutral-900 text-white dark:bg-neutral-200 dark:text-black",
"w-1/2 cursor-pointer text-sm rounded-full h-8 px-3 flex items-center"
)}
>
@@ -149,7 +146,8 @@ export default function Lightning() {
setMode("model")}
className={cn(
- mode === "model" && "bg-neutral-200 text-black",
+ mode === "model" &&
+ "bg-neutral-900 text-white dark:bg-neutral-200 dark:text-black",
"w-1/2 cursor-pointer text-sm rounded-full h-8 px-3 flex items-center"
)}
>
diff --git a/components/compare-image-label.tsx b/components/compare-image-label.tsx
new file mode 100644
index 0000000..488badc
--- /dev/null
+++ b/components/compare-image-label.tsx
@@ -0,0 +1,32 @@
+import { cn, formatTime } from "@/lib/utils";
+import { LoaderIcon } from "lucide-react";
+
+interface CompareImageLabelProps {
+ modelData: any;
+ name: string;
+ position?: "left" | "right";
+}
+
+const CompareImageLabel = ({
+ modelData,
+ name,
+ position = "left",
+}: CompareImageLabelProps) => (
+
+ {name}
+ {modelData ? (
+
+ {modelData ? formatTime(modelData.inferenceTime * 1000) : `n/a`}
+
+ ) : (
+
+ )}
+
+);
+
+export default CompareImageLabel;
diff --git a/components/model-compare.tsx b/components/model-compare.tsx
index 2330031..b83e8ed 100644
--- a/components/model-compare.tsx
+++ b/components/model-compare.tsx
@@ -1,9 +1,18 @@
-import { cn, formatTime } from "@/lib/utils";
+import { formatTime } from "@/lib/utils";
import Image from "next/image";
import {
ReactCompareSlider,
ReactCompareSliderImage,
} from "react-compare-slider";
+import CompareImageLabel from "./compare-image-label";
+
+interface ModelCompareProps {
+ originalImage: string;
+ position: number;
+ setPosition: (position: number) => void;
+ modelOne: any;
+ modelTwo: any;
+}
const ModelCompare = ({
originalImage,
@@ -11,7 +20,7 @@ const ModelCompare = ({
setPosition,
modelOne,
modelTwo,
-}) => {
+}: ModelCompareProps) => {
return (
@@ -55,20 +64,7 @@ const ModelCompare = ({
onPositionChange={(position) => setPosition(position)}
itemOne={
<>
-
- CCSR
- {modelOne && (
-
- {modelOne
- ? formatTime(modelOne.inferenceTime * 1000)
- : `n/a`}
-
- )}
-
+
-
- {modelTwo && (
-
- {modelTwo
- ? formatTime(modelTwo.inferenceTime * 1000)
- : `n/a`}
-
- )}
- SUPIR
-
+
+
void;
+ modelOne: any;
+ modelTwo: any;
+}
const OriginalCompare = ({
originalImage,
@@ -12,7 +19,7 @@ const OriginalCompare = ({
setPosition,
modelOne,
modelTwo,
-}) => {
+}: OriginalCompareProps) => {
return (