AreejMehboob commited on
Commit
7603e25
·
verified ·
1 Parent(s): d47acd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -91,6 +91,7 @@ def get_text_embeddings(text):
91
  with torch.no_grad(): # Disable gradient calculation for inference
92
  outputs = text_model(**inputs)
93
  embeddings = outputs.last_hidden_state.mean(dim=1)
 
94
  return embeddings[0].detach().cpu().numpy()
95
 
96
  # :white_check_mark: Gradio interface function
 
91
  with torch.no_grad(): # Disable gradient calculation for inference
92
  outputs = text_model(**inputs)
93
  embeddings = outputs.last_hidden_state.mean(dim=1)
94
+ print(embeddings[0].detach().cpu().numpy())
95
  return embeddings[0].detach().cpu().numpy()
96
 
97
  # :white_check_mark: Gradio interface function