Spaces:
Sleeping
Sleeping
tiffank1802
commited on
Commit
·
be6c30d
1
Parent(s):
420aa0c
Make celery import conditional in __init__.py
Browse files
simulationserver/__init__.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
|
| 3 |
+
HF_SPACES = os.environ.get('HF_SPACES', '').lower() in ('true', '1', 'yes')
|
| 4 |
+
|
| 5 |
+
if not HF_SPACES:
|
| 6 |
+
from .celery import app as celery_app
|
| 7 |
+
__all__ = ('celery_app',)
|
| 8 |
+
else:
|
| 9 |
+
__all__ = ()
|