Tonic commited on
Commit
a12fc17
1 Parent(s): cde2bca

add decorator for ZeroGPU

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -59,7 +59,8 @@ class EmbeddingGenerator:
59
 
60
  def clear_cuda_cache(self):
61
  torch.cuda.empty_cache()
62
-
 
63
  def compute_embeddings(self, input_text: str):
64
  # Get the intention
65
  intention_completion = self.intention_client.chat.completions.create(
 
59
 
60
  def clear_cuda_cache(self):
61
  torch.cuda.empty_cache()
62
+
63
+ @spaces.GPU
64
  def compute_embeddings(self, input_text: str):
65
  # Get the intention
66
  intention_completion = self.intention_client.chat.completions.create(