Temp GC deployment

This commit is contained in:
Seth Forsgren 2022-12-22 10:57:48 -08:00
parent 0ab9dede71
commit 15b04f0b75
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,7 @@ export default function ModelInference({
setNumRequestsMade((n) => n + 1); setNumRequestsMade((n) => n + 1);
// Customize for baseten // Customize for baseten
const apiHandler = useBaseten ? process.env.NEXT_PUBLIC_RIFFUSION_BASETEN_BLUEPRINT_URL : "/api/server"; const apiHandler = useBaseten ? process.env.NEXT_PUBLIC_RIFFUSION_BASETEN_GC_URL : "/api/server";
const payload = useBaseten const payload = useBaseten
? { worklet_input: inferenceInput } ? { worklet_input: inferenceInput }
: inferenceInput; : inferenceInput;
@ -125,6 +125,7 @@ export default function ModelInference({
const response = await fetch(apiHandler, { const response = await fetch(apiHandler, {
method: "POST", method: "POST",
body: JSON.stringify(payload), body: JSON.stringify(payload),
headers: { 'Content-Type': 'application/json' }
}); });
const data = await response.json(); const data = await response.json();