hyungjoochae's picture
Upload folder using huggingface_hub
321a7a2 verified
raw
history blame contribute delete
303 Bytes
export const API_BASE_URL =
(process.env.API_BASE_URL ??
process.env.NEXT_PUBLIC_API_BASE_URL ??
"http://127.0.0.1:8000")?.replace(/\/+$/, "");
export function apiUrl(path: string): string {
if (!path.startsWith("/")) return `${API_BASE_URL}/${path}`;
return `${API_BASE_URL}${path}`;
}