Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
Β·
e674d19
1
Parent(s):
cd4ee95
fix config issues
Browse files- .env.sample β .env +1 -0
- src/index.mts +16 -1
.env.sample β .env
RENAMED
@@ -82,6 +82,7 @@ VC_UPSCALING_SPACE_API_URL_1="https://jbilcke-hf-upscaling-server-1.hf.space"
|
|
82 |
VC_UPSCALING_SPACE_API_URL_2="https://jbilcke-hf-upscaling-server-2.hf.space"
|
83 |
VC_UPSCALING_SPACE_API_URL_3="https://jbilcke-hf-upscaling-server-3.hf.space"
|
84 |
VC_UPSCALING_SPACE_API_URL_4="https://jbilcke-hf-upscaling-server-4.hf.space"
|
|
|
85 |
|
86 |
#----------------- VIDEO UPSCALING SERVERS -----------------------
|
87 |
VC_VIDEO_UPSCALE_SPACE_API_URL_1="https://jbilcke-hf-video-upscaling-server-1.hf.space"
|
|
|
82 |
VC_UPSCALING_SPACE_API_URL_2="https://jbilcke-hf-upscaling-server-2.hf.space"
|
83 |
VC_UPSCALING_SPACE_API_URL_3="https://jbilcke-hf-upscaling-server-3.hf.space"
|
84 |
VC_UPSCALING_SPACE_API_URL_4="https://jbilcke-hf-upscaling-server-4.hf.space"
|
85 |
+
#VC_UPSCALING_SPACE_API_URL_5="https://jbilcke-hf-upscaling-server-5.hf.space"
|
86 |
|
87 |
#----------------- VIDEO UPSCALING SERVERS -----------------------
|
88 |
VC_VIDEO_UPSCALE_SPACE_API_URL_1="https://jbilcke-hf-video-upscaling-server-1.hf.space"
|
src/index.mts
CHANGED
@@ -1,12 +1,27 @@
|
|
1 |
import { createReadStream, existsSync } from "node:fs"
|
2 |
import path from "node:path"
|
|
|
3 |
|
4 |
import { validate as uuidValidate } from "uuid"
|
5 |
import express from "express"
|
6 |
|
7 |
import dotenv from "dotenv"
|
8 |
|
9 |
-
dotenv.config(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
import { Video, VideoStatus, VideoAPIRequest, RenderRequest, RenderedScene, ImageAnalysisRequest, ImageAnalysisResponse, SoundAnalysisResponse, SoundAnalysisRequest } from "./types.mts"
|
12 |
|
|
|
1 |
import { createReadStream, existsSync } from "node:fs"
|
2 |
import path from "node:path"
|
3 |
+
import fs from "node:fs"
|
4 |
|
5 |
import { validate as uuidValidate } from "uuid"
|
6 |
import express from "express"
|
7 |
|
8 |
import dotenv from "dotenv"
|
9 |
|
10 |
+
dotenv.config()
|
11 |
+
|
12 |
+
try {
|
13 |
+
if (fs.existsSync(".env.local")) {
|
14 |
+
const result = dotenv.config({ path: ".env.local" })
|
15 |
+
console.log("using .env.local")
|
16 |
+
process.env = {
|
17 |
+
...process.env,
|
18 |
+
...result.parsed,
|
19 |
+
}
|
20 |
+
}
|
21 |
+
} catch (err) {
|
22 |
+
// do nothing
|
23 |
+
console.log("using .env")
|
24 |
+
}
|
25 |
|
26 |
import { Video, VideoStatus, VideoAPIRequest, RenderRequest, RenderedScene, ImageAnalysisRequest, ImageAnalysisResponse, SoundAnalysisResponse, SoundAnalysisRequest } from "./types.mts"
|
27 |
|