Spaces:
Running
on
Zero
Running
on
Zero
Add warmup function in app.py to initialize GPU processing with a print statement.
Browse files
app.py
CHANGED
@@ -93,7 +93,10 @@ 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():
|
|
|
|
|
|
|
97 |
|
98 |
@spaces.GPU(duration=30)
|
99 |
def create_embeddings_30(texts_to_embedd):
|
|
|
93 |
|
94 |
|
95 |
@spaces.GPU(duration=1) # ← forces the detector to see a GPU-aware fn
|
96 |
+
def _warmup():
|
97 |
+
print("Warming up...")
|
98 |
+
|
99 |
+
_warmup()
|
100 |
|
101 |
@spaces.GPU(duration=30)
|
102 |
def create_embeddings_30(texts_to_embedd):
|