From 8d1cd9a99e254d7e6ef46f1b40ff5041fbc76053 Mon Sep 17 00:00:00 2001 From: Nikon Podgorny Date: Sat, 14 Oct 2023 11:17:37 +0300 Subject: [PATCH] new server; small fix --- frontend/MASSter-frontend/src/lib/pb-client.ts | 2 +- frontend/MASSter-frontend/src/pages/add-prompt.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/MASSter-frontend/src/lib/pb-client.ts b/frontend/MASSter-frontend/src/lib/pb-client.ts index 376cb8a..309d55c 100644 --- a/frontend/MASSter-frontend/src/lib/pb-client.ts +++ b/frontend/MASSter-frontend/src/lib/pb-client.ts @@ -1,6 +1,6 @@ import PocketBase from "pocketbase"; -export const pb = new PocketBase("https://pb.apps.npcode.xyz"); +export const pb = new PocketBase("https://pb.apps.npod.space"); // pb.autoCancellation(false); diff --git a/frontend/MASSter-frontend/src/pages/add-prompt.tsx b/frontend/MASSter-frontend/src/pages/add-prompt.tsx index 641120e..9e3bd3b 100644 --- a/frontend/MASSter-frontend/src/pages/add-prompt.tsx +++ b/frontend/MASSter-frontend/src/pages/add-prompt.tsx @@ -174,7 +174,8 @@ export function AddAdvancedPromptCard() { .refine( (files) => ACCEPTED_VIDEO_TYPES.includes(files.type), "Пока мы поддерживаем только .mp4 видеоролики :(" - ), + ) + .optional(), numImages: z.coerce.number().min(1).max(10) }); @@ -193,7 +194,9 @@ export function AddAdvancedPromptCard() { for (let file in data.inputImage) { formData.append("input_image", file); } - formData.append("video", data.video); + if (data.video) { + formData.append("video", data.video); + } formData.append("status", "open"); formData.append("num_images", `${data.numImages}`); pb.collection("text_generation_mvp")