Add more prompts and fix flask
This commit is contained in:
parent
15b04f0b75
commit
732bfb0e5f
|
@ -117,15 +117,20 @@ 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_GC_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;
|
||||||
|
|
||||||
|
// NOTE(hayk): Clean this up with server.js, there's something fishy going on.
|
||||||
|
const headers = useBaseten ? { "Content-Type": "application/json" } : {};
|
||||||
|
|
||||||
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' }
|
headers: headers,
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
@ -134,10 +139,7 @@ export default function ModelInference({
|
||||||
|
|
||||||
if (useBaseten) {
|
if (useBaseten) {
|
||||||
if (data?.output) {
|
if (data?.output) {
|
||||||
newResultCallback(
|
newResultCallback(inferenceInput, data.output);
|
||||||
inferenceInput,
|
|
||||||
data.output
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
console.error("Baseten call failed: ", data);
|
console.error("Baseten call failed: ", data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
let headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,24 +1,32 @@
|
||||||
// List of interesting prompts to randomly sample.
|
// List of interesting prompts to randomly sample.
|
||||||
export const samplePrompts = [
|
export const samplePrompts = [
|
||||||
|
"a folksy blues song from the mississippi delta around 1910",
|
||||||
"acoustic folk violin jam",
|
"acoustic folk violin jam",
|
||||||
"ancient chinese hymn",
|
"ancient chinese hymn",
|
||||||
"anger rap",
|
"anger rap",
|
||||||
|
"arabic gospel vocals",
|
||||||
"bongos on a havana street",
|
"bongos on a havana street",
|
||||||
"brazilian Forró dance",
|
"bossa nova with distorted guitar",
|
||||||
"bubblegum eurodance",
|
"bubblegum eurodance",
|
||||||
"church bells",
|
"church bells",
|
||||||
"classical italian tenor operatic pop",
|
"classical italian tenor operatic pop",
|
||||||
"copacabana beach",
|
"copacabana beach",
|
||||||
|
"deep, smooth synthwave with a dream-like atmosphere",
|
||||||
|
"emotional disco",
|
||||||
"funk bassline with a jazzy saxophone",
|
"funk bassline with a jazzy saxophone",
|
||||||
|
"ibiza at 3am",
|
||||||
"jamaican dancehall vocals",
|
"jamaican dancehall vocals",
|
||||||
|
"jazzy clarinet with maracas",
|
||||||
"jazzy rapping from paris",
|
"jazzy rapping from paris",
|
||||||
"k-pop boy group",
|
"k-pop boy group",
|
||||||
|
"latent space vaporwave",
|
||||||
"lo-fi beat for the holidays",
|
"lo-fi beat for the holidays",
|
||||||
"mambo but from kenya",
|
"mambo but from Kenya",
|
||||||
"piano concerto in a minor",
|
"piano concerto in A minor",
|
||||||
"post-teen pop talent show winner",
|
"post-teen pop talent show winner",
|
||||||
"psychedelic nepalese trance",
|
"psychedelic nepalese trance",
|
||||||
"rock and roll electric guitar solo",
|
"rock and roll electric guitar solo",
|
||||||
|
"scott joplin style ragtime piano",
|
||||||
"smooth tropical dance jazz",
|
"smooth tropical dance jazz",
|
||||||
"swing jazz trumpet",
|
"swing jazz trumpet",
|
||||||
"techno DJ and a country fiddle",
|
"techno DJ and a country fiddle",
|
||||||
|
@ -28,21 +36,29 @@ export const samplePrompts = [
|
||||||
export const rollTheDicePrompts = [
|
export const rollTheDicePrompts = [
|
||||||
"(caribbean:1.5) (jazz:0.3)",
|
"(caribbean:1.5) (jazz:0.3)",
|
||||||
"alarm clock",
|
"alarm clock",
|
||||||
"arabic (vocals:1.5)",
|
"bird calls",
|
||||||
"baroque new wave pop",
|
"baroque new wave pop",
|
||||||
|
"Berlin and Paris electronic fused together with acoustic tunes",
|
||||||
"breathing",
|
"breathing",
|
||||||
|
"brazilian Forró dance",
|
||||||
"british soul dance",
|
"british soul dance",
|
||||||
"chainsaw funk",
|
"chainsaw funk",
|
||||||
"church organ with a harpsichord",
|
"church organ with a harpsichord",
|
||||||
"clarinet with maracas",
|
|
||||||
"classic rock mellow gold progressive",
|
"classic rock mellow gold progressive",
|
||||||
"classical flute",
|
"classical flute",
|
||||||
|
"cowbell ballad",
|
||||||
|
"funky human music",
|
||||||
|
"hip hop vocals piano cowbell",
|
||||||
|
"interdimensional cable",
|
||||||
"jamaican ska rap",
|
"jamaican ska rap",
|
||||||
"laughing",
|
"laughing",
|
||||||
|
"lucky disco punk",
|
||||||
"new orleans blues",
|
"new orleans blues",
|
||||||
"piano funk",
|
"piano funk",
|
||||||
"pop r&b urban contemporary",
|
"pop r&b urban contemporary",
|
||||||
"reggae fusion",
|
"reggae fusion",
|
||||||
|
"Shepard tone",
|
||||||
|
"smelly clown",
|
||||||
"square dancing in wyoming",
|
"square dancing in wyoming",
|
||||||
"tropical deep sea",
|
"tropical deep sea",
|
||||||
"tropical electro house moombahton",
|
"tropical electro house moombahton",
|
||||||
|
|
Loading…
Reference in New Issue