Spaces:
Runtime error
Runtime error
streetyogi
commited on
Commit
·
3f8fe73
1
Parent(s):
82eb6ea
Update inference_server.py
Browse files- inference_server.py +1 -1
inference_server.py
CHANGED
@@ -23,7 +23,7 @@ def predict(input_text: str):
|
|
23 |
# Use the BERT LM to generate for all input strings
|
24 |
with torch.no_grad():
|
25 |
outputs = model(input_ids)
|
26 |
-
logits =
|
27 |
|
28 |
# Find the input string that is most similar to the new input string, according to the BERT LM
|
29 |
similarity_scores = torch.nn.functional.csine_similarity(logits[:, 0, :],
|
|
|
23 |
# Use the BERT LM to generate for all input strings
|
24 |
with torch.no_grad():
|
25 |
outputs = model(input_ids)
|
26 |
+
logits = outputs[0]
|
27 |
|
28 |
# Find the input string that is most similar to the new input string, according to the BERT LM
|
29 |
similarity_scores = torch.nn.functional.csine_similarity(logits[:, 0, :],
|