environment
Browse files1234export const environment = {production: true,pyDetectApiUrl: 'https://pykara-Py-detect-backend.hf.space'};123456789101112131415161718const hostname = window.location.hostname;// Local modes: ng serve, localhost, or IP on local networkconst isLocal =hostname === 'localhost' ||hostname === '127.0.0.1' ||hostname.startsWith('192.168.') ||hostname.startsWith('10.');// Decide API URL based on where the app is runningconst pyDetectApiUrl = isLocal? 'http://127.0.0.1:5000' // your local Flask: 'https://pykara-Py-detect-backend.hf.space'; // Hugging Face backendexport const environment = {production: !isLocal,pyDetectApiUrl};
src/environments/environment.ts+16-2