Álvaro Valenzuela Valdes commited on
Commit ·
048a272
1
Parent(s): d410380
refactor: point all HF spaces to centralized personal backend
Browse files- frontend/lib/api.ts +3 -10
frontend/lib/api.ts
CHANGED
|
@@ -18,18 +18,11 @@ export function getAPIBase(): string {
|
|
| 18 |
|
| 19 |
// 2. Hugging Face Space detection (IMPROVED)
|
| 20 |
if (hostname.includes('.hf.space')) {
|
| 21 |
-
//
|
| 22 |
-
|
| 23 |
-
let backendUrl = `https://rewchile-andesai-backend.hf.space`;
|
| 24 |
-
|
| 25 |
-
if (hostname.includes('lablab-ai-amd-developer-hackathon')) {
|
| 26 |
-
backendUrl = `https://lablab-ai-amd-developer-hackathon-andesai-backend.hf.space`;
|
| 27 |
-
} else if (hostname.includes('satori47')) {
|
| 28 |
-
backendUrl = `https://satori47-andesai-backend.hf.space`;
|
| 29 |
-
}
|
| 30 |
|
| 31 |
console.log('[API] Hugging Face Space detected. Frontend:', hostname);
|
| 32 |
-
console.log('[API] Connecting to Backend:', backendUrl);
|
| 33 |
return backendUrl;
|
| 34 |
}
|
| 35 |
|
|
|
|
| 18 |
|
| 19 |
// 2. Hugging Face Space detection (IMPROVED)
|
| 20 |
if (hostname.includes('.hf.space')) {
|
| 21 |
+
// The user prefers to centralize all traffic through their personal REWCHILE backend
|
| 22 |
+
const backendUrl = `https://rewchile-andesai-backend.hf.space`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
console.log('[API] Hugging Face Space detected. Frontend:', hostname);
|
| 25 |
+
console.log('[API] Connecting to Centralized Backend:', backendUrl);
|
| 26 |
return backendUrl;
|
| 27 |
}
|
| 28 |
|