Upload folder using huggingface_hub
Browse files- src/app.py +2 -2
src/app.py
CHANGED
|
@@ -20,8 +20,8 @@ from inference import predict_engine_condition
|
|
| 20 |
|
| 21 |
def _is_running_in_hf_space() -> bool:
|
| 22 |
"""Check if app is running in Hugging Face Space."""
|
| 23 |
-
# HF Spaces set SPACE_ID environment variable
|
| 24 |
-
return os.getenv("SPACE_ID") is not None
|
| 25 |
|
| 26 |
|
| 27 |
def _get_default_source() -> str:
|
|
|
|
| 20 |
|
| 21 |
def _is_running_in_hf_space() -> bool:
|
| 22 |
"""Check if app is running in Hugging Face Space."""
|
| 23 |
+
# HF Spaces set SPACE_ID or SYSTEM environment variable
|
| 24 |
+
return os.getenv("SPACE_ID") is not None or os.getenv("SYSTEM") == "spaces"
|
| 25 |
|
| 26 |
|
| 27 |
def _get_default_source() -> str:
|