Spaces:
Running
on
Zero
Running
on
Zero
add spaces import
Browse files
app.py
CHANGED
@@ -87,9 +87,13 @@ is_running_in_hf_zero_gpu()
|
|
87 |
def is_running_in_hf_space():
|
88 |
return "SPACE_ID" in os.environ
|
89 |
|
90 |
-
if is_running_in_hf_space():
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
|
94 |
#if is_running_in_hf_space():
|
95 |
#import spaces # necessary to run on Zero.
|
|
|
87 |
def is_running_in_hf_space():
|
88 |
return "SPACE_ID" in os.environ
|
89 |
|
90 |
+
#if is_running_in_hf_space():
|
91 |
+
import spaces # necessary to run on Zero.
|
92 |
+
from spaces.zero.client import _get_token
|
93 |
+
|
94 |
+
|
95 |
+
@spaces.GPU(duration=1) # ← forces the detector to see a GPU-aware fn
|
96 |
+
def _warmup(): pass
|
97 |
|
98 |
#if is_running_in_hf_space():
|
99 |
#import spaces # necessary to run on Zero.
|