ananttripathiak commited on
Commit
8468016
·
verified ·
1 Parent(s): 9c0ed5e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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: