Spaces:
Running
on
Zero
Running
on
Zero
printout running statement
Browse files
app.py
CHANGED
@@ -188,6 +188,7 @@ def no_op_decorator(func):
|
|
188 |
|
189 |
|
190 |
if is_running_in_hf_space():
|
|
|
191 |
@spaces.GPU(duration=30)
|
192 |
def create_embeddings_30(texts_to_embedd):
|
193 |
"""Create embeddings for the input texts using the loaded model."""
|
@@ -210,6 +211,7 @@ if is_running_in_hf_space():
|
|
210 |
|
211 |
|
212 |
else:
|
|
|
213 |
def create_embeddings(texts_to_embedd):
|
214 |
"""Create embeddings for the input texts using the loaded model."""
|
215 |
return model.encode(texts_to_embedd, show_progress_bar=True, batch_size=192)
|
|
|
188 |
|
189 |
|
190 |
if is_running_in_hf_space():
|
191 |
+
print("Running in HF Space")
|
192 |
@spaces.GPU(duration=30)
|
193 |
def create_embeddings_30(texts_to_embedd):
|
194 |
"""Create embeddings for the input texts using the loaded model."""
|
|
|
211 |
|
212 |
|
213 |
else:
|
214 |
+
print("Running locally")
|
215 |
def create_embeddings(texts_to_embedd):
|
216 |
"""Create embeddings for the input texts using the loaded model."""
|
217 |
return model.encode(texts_to_embedd, show_progress_bar=True, batch_size=192)
|