Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -154,7 +154,7 @@ def compute_similarity(selected_task, sentence1, sentence2, extra_sentence1, ext
|
|
154 |
clear_cuda_cache()
|
155 |
return similarity_scores
|
156 |
|
157 |
-
|
158 |
def compute_cosine_similarity(emb1, emb2):
|
159 |
tensor1 = torch.tensor(emb1).to(device).half()
|
160 |
tensor2 = torch.tensor(emb2).to(device).half()
|
|
|
154 |
clear_cuda_cache()
|
155 |
return similarity_scores
|
156 |
|
157 |
+
@spaces.GPU
|
158 |
def compute_cosine_similarity(emb1, emb2):
|
159 |
tensor1 = torch.tensor(emb1).to(device).half()
|
160 |
tensor2 = torch.tensor(emb2).to(device).half()
|