Skip to content

Commit da45077

Browse files
committed
new modela dded with fix: upgrade caed added
1 parent f71bbb2 commit da45077

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

app/(dashboard)/(routes)/image/constants.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ export const amountOptions = [
3434

3535
export const modelsOptions = [
3636
{
37-
value:"https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3-medium-diffusers",
37+
value:"https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3.5-large-turbo",
3838
lable:"Model-> Stable-diffusion-3-M"
3939
},
4040
{
4141
value: "https://api-inference.huggingface.co/models/SG161222/RealVisXL_V4.0",
4242
lable: "RealV-Mk-1"
4343
},
44+
{
45+
value: "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev",
46+
lable: "Flux V1"
47+
},
4448
]

app/api/image/route.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { checkSubscription } from "@/lib/subscription";
66

77
require("dotenv").config();
88

9-
// Define the structure of the request body
9+
1010
interface RequestBody {
1111
prompt: string;
12-
models: string; // Added modelUrl to select which model to use
12+
models: string;
1313
}
1414

1515
// Define the structure of the error response from Hugging Face API
@@ -34,7 +34,8 @@ function fetchWithTimeout(
3434
}
3535
const modelUrl = {
3636
"RealV-Mk-1": "https://api-inference.huggingface.co/models/SG161222/RealVisXL_V4.0",
37-
"Stable-diffusion-3-M": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3-medium-diffusers",
37+
"Stable-diffusion-3-M": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3.5-large-turbo",
38+
"Flux V1": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
3839

3940
};
4041

components/freeCounter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ export const FreeCounter = ({apiLimitCount = 0, isPro = false}: FreeCounterProps
2525
return null
2626
}
2727
return (
28-
<div className="px-3">
28+
<div className="py-52">
2929
<Card className="bg-white/10 border-0">
30-
<CardContent className="py-6">
30+
<CardContent className="py-5">
3131
<div className="text-center text-sm text-white mb-4 space-y-2">
3232
<p>
3333
{apiLimitCount} / {MAX_FREE_COUNTS} Free Generations
3434
<Progress className="h-3" value={(apiLimitCount / MAX_FREE_COUNTS) * 100}/>
3535
</p>
3636
</div>
37-
<Button onClick={proModel.onOpen} className="w-full" variant="premium">
37+
<Button onClick={proModel.onOpen} className="w-full" variant="premium">
3838
Upgrade
3939
<Zap className="w-4 h-4 ml-2 fill-white"/>
4040
</Button>

components/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ const SideBar = ({ apiLimitCount = 0, isPro = false}: SidebarProps) => {
8484

8585
)}
8686
>
87-
<div className="flex items-center flex-1">
87+
<div className="flex items-center flex-1 bg0">
8888
<route.icon className={cn ("h-5 w-5 mr-3", route.color)}/>
8989
{route.lable}
9090
</div>
9191
</Link>
9292
))}
9393
</div>
94+
<FreeCounter isPro={isPro} apiLimitCount ={apiLimitCount}/>
9495
</div>
95-
<FreeCounter isPro={isPro} apiLimitCount ={apiLimitCount}/>
9696
</div>
9797
)
9898
}

0 commit comments

Comments
 (0)