Spaces:
Paused
Paused
Julian Bilcke
commited on
Commit
·
1bc6125
1
Parent(s):
05d68e7
up
Browse files
src/production/generateAudio.mts
CHANGED
|
@@ -9,8 +9,8 @@ export const state = {
|
|
| 9 |
}
|
| 10 |
|
| 11 |
const instances: string[] = [
|
| 12 |
-
process.env.
|
| 13 |
-
]
|
| 14 |
|
| 15 |
// TODO we should use an inference endpoint instead
|
| 16 |
export async function generateAudio(prompt: string, audioFileName: string) {
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
const instances: string[] = [
|
| 12 |
+
`${process.env.VC_AUDIO_GENERATION_SPACE_API_URL_1 || ""}`
|
| 13 |
+
].filter(instance => instance?.length > 0)
|
| 14 |
|
| 15 |
// TODO we should use an inference endpoint instead
|
| 16 |
export async function generateAudio(prompt: string, audioFileName: string) {
|
src/production/upscaleVideo.mts
CHANGED
|
@@ -9,8 +9,10 @@ import { pendingFilesDirFilePath } from '../config.mts'
|
|
| 9 |
import { moveFileFromTmpToPending } from "../utils/moveFileFromTmpToPending.mts"
|
| 10 |
|
| 11 |
const instances: string[] = [
|
| 12 |
-
process.env.
|
| 13 |
-
]
|
|
|
|
|
|
|
| 14 |
|
| 15 |
// TODO we should use an inference endpoint instead (or a space which bakes generation + upscale at the same time)
|
| 16 |
export async function upscaleVideo(fileName: string, prompt: string) {
|
|
@@ -29,6 +31,9 @@ export async function upscaleVideo(fileName: string, prompt: string) {
|
|
| 29 |
waitUntil: 'networkidle2',
|
| 30 |
})
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
const promptField = await page.$('textarea')
|
| 33 |
await promptField.type(prompt)
|
| 34 |
|
|
|
|
| 9 |
import { moveFileFromTmpToPending } from "../utils/moveFileFromTmpToPending.mts"
|
| 10 |
|
| 11 |
const instances: string[] = [
|
| 12 |
+
`${process.env.VC_VIDEO_UPSCALE_SPACE_API_URL_1 || ""}`
|
| 13 |
+
].filter(instance => instance?.length > 0)
|
| 14 |
+
|
| 15 |
+
const secretToken = `${process.env.VC_MICROSERVICE_SECRET_TOKEN || ""}`
|
| 16 |
|
| 17 |
// TODO we should use an inference endpoint instead (or a space which bakes generation + upscale at the same time)
|
| 18 |
export async function upscaleVideo(fileName: string, prompt: string) {
|
|
|
|
| 31 |
waitUntil: 'networkidle2',
|
| 32 |
})
|
| 33 |
|
| 34 |
+
const secretField = await page.$('input[type=text]')
|
| 35 |
+
await secretField.type(prompt)
|
| 36 |
+
|
| 37 |
const promptField = await page.$('textarea')
|
| 38 |
await promptField.type(prompt)
|
| 39 |
|