bluuebunny commited on
Commit
7b953a2
·
verified ·
1 Parent(s): f80fa87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,5 +1,9 @@
1
  import os
2
 
3
- # List all environment variables
4
- for key, value in os.environ.items():
5
- print(f"{key}: {value}")
 
 
 
 
 
1
  import os
2
 
3
+ def is_running_in_huggingface_space():
4
+ return "SPACE_ID" in os.environ
5
+
6
+ if is_running_in_huggingface_space():
7
+ print("The script is running in a Hugging Face Space.")
8
+ else:
9
+ print("The script is not running in a Hugging Face Space.")