Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add base_model field
Browse files
src/routes/api/models/+server.ts
CHANGED
@@ -88,12 +88,13 @@ export async function PATCH({ request } : RequestEvent) {
|
|
88 |
hugging_face_model2 = await hugging_face_request2.json()?.catch(() => {})
|
89 |
|
90 |
}
|
91 |
-
|
92 |
-
const base_model = hugging_face_model.tags.find((tag: string) => tag.startsWith("base_model:"))?.split(":")[1] ?? null
|
93 |
-
|
94 |
if (!hugging_face_model?.[0]) {
|
95 |
continue;
|
96 |
}
|
|
|
|
|
|
|
97 |
await prisma.model.update({
|
98 |
where: {
|
99 |
id: model.id
|
|
|
88 |
hugging_face_model2 = await hugging_face_request2.json()?.catch(() => {})
|
89 |
|
90 |
}
|
91 |
+
|
|
|
|
|
92 |
if (!hugging_face_model?.[0]) {
|
93 |
continue;
|
94 |
}
|
95 |
+
|
96 |
+
const base_model = hugging_face_model?.tags?.find((tag: string) => tag.startsWith("base_model:"))?.split(":")[1] ?? null
|
97 |
+
|
98 |
await prisma.model.update({
|
99 |
where: {
|
100 |
id: model.id
|