Download src/environments/environment.ts from pykara/Py-detect: direct link, hf CLI and curl.
- Browser
- Download file 551 Bytes
-
https://huggingface.co/spaces/pykara/Py-detect/resolve/main/src/environments/environment.ts
- Command line
-
hf download hf://spaces/pykara/Py-detect/src/environments/environment.ts
-
curl -L -o environment.ts https://huggingface.co/spaces/pykara/Py-detect/resolve/main/src/environments/environment.ts
551 Bytes
| 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 | |
| }; | |