Update README.md
Browse files
README.md
CHANGED
@@ -70,10 +70,6 @@ tokenizer = AutoTokenizer.from_pretrained('cmarkea/bloomz-3b-retriever-v2')
|
|
70 |
model = AutoModel.from_pretrained('cmarkea/bloomz-3b-retriever-v2')
|
71 |
|
72 |
def infer(txt: Union[str, List[str]]):
|
73 |
-
if isinstance(txt, str):
|
74 |
-
length = 0
|
75 |
-
else:
|
76 |
-
length = len(txt)
|
77 |
tok = tokenizer(txt, padding=True, return_tensors='pt')
|
78 |
with torch.no_grad():
|
79 |
embedding = model(**tok)
|
|
|
70 |
model = AutoModel.from_pretrained('cmarkea/bloomz-3b-retriever-v2')
|
71 |
|
72 |
def infer(txt: Union[str, List[str]]):
|
|
|
|
|
|
|
|
|
73 |
tok = tokenizer(txt, padding=True, return_tensors='pt')
|
74 |
with torch.no_grad():
|
75 |
embedding = model(**tok)
|