Spaces:
Runtime error
Runtime error
taskswithcode
commited on
Commit
•
6819594
1
Parent(s):
580406b
Bug fix
Browse files- twc_embeddings.py +1 -1
twc_embeddings.py
CHANGED
@@ -215,7 +215,7 @@ class SimCSEModel:
|
|
215 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
216 |
self.model = AutoModel.from_pretrained(model_name)
|
217 |
|
218 |
-
def compute_embeddings(self,input_file_name,
|
219 |
texts = read_text(input_data) if is_file == True else input_data
|
220 |
inputs = self.tokenizer(texts, padding=True, truncation=True, return_tensors="pt")
|
221 |
with torch.no_grad():
|
|
|
215 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
216 |
self.model = AutoModel.from_pretrained(model_name)
|
217 |
|
218 |
+
def compute_embeddings(self,input_file_name,input_data,is_file):
|
219 |
texts = read_text(input_data) if is_file == True else input_data
|
220 |
inputs = self.tokenizer(texts, padding=True, truncation=True, return_tensors="pt")
|
221 |
with torch.no_grad():
|