File size: 551 Bytes
1a79c50 b1efa3a 1a79c50 73566f6 1a79c50 73566f6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
const hostname = window.location.hostname;
// Local modes: ng serve, localhost, or IP on local network
const isLocal =
hostname === 'localhost' ||
hostname === '127.0.0.1' ||
hostname.startsWith('192.168.') ||
hostname.startsWith('10.');
// Decide API URL based on where the app is running
const pyDetectApiUrl = isLocal
? 'http://127.0.0.1:5002' // your local Flask
: 'https://pykara-Py-detect-backend.hf.space'; // Hugging Face backend
export const environment = {
production: !isLocal,
pyDetectApiUrl
};
|