m7n commited on
Commit
a682539
·
1 Parent(s): 2945ef8

Add warmup function in app.py to initialize GPU processing with a print statement.

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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(): pass
 
 
 
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):