Tonic commited on
Commit
a2e7b70
·
verified ·
1 Parent(s): 087fe54

Update app.py

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