Spaces:
Runtime error
Runtime error
Tao Wu commited on
Commit ·
8bfe948
1
Parent(s): 93a26b1
init
Browse files- app/embedding_setup.py +2 -2
- requirements.txt +0 -0
app/embedding_setup.py
CHANGED
|
@@ -74,7 +74,7 @@ def evaluate(
|
|
| 74 |
top_p=1.0,
|
| 75 |
top_k=40,
|
| 76 |
num_beams=1,
|
| 77 |
-
max_new_tokens=
|
| 78 |
batch_size=1,
|
| 79 |
**kwargs,
|
| 80 |
):
|
|
@@ -94,7 +94,7 @@ def compare_docs_with_context(doc_a, doc_b, target_occupation_name, target_occup
|
|
| 94 |
output = evaluate(prompt)
|
| 95 |
# Compare based on the response: [A] means doc_a > doc_b, [B] means doc_a < doc_b
|
| 96 |
print(output)
|
| 97 |
-
result_token_id = output.details.
|
| 98 |
if result_token_id == first_id:
|
| 99 |
return 1 # doc_a should come before doc_b
|
| 100 |
elif result_token_id == second_id:
|
|
|
|
| 74 |
top_p=1.0,
|
| 75 |
top_k=40,
|
| 76 |
num_beams=1,
|
| 77 |
+
max_new_tokens=20,
|
| 78 |
batch_size=1,
|
| 79 |
**kwargs,
|
| 80 |
):
|
|
|
|
| 94 |
output = evaluate(prompt)
|
| 95 |
# Compare based on the response: [A] means doc_a > doc_b, [B] means doc_a < doc_b
|
| 96 |
print(output)
|
| 97 |
+
result_token_id = output.details.tokens[0].id
|
| 98 |
if result_token_id == first_id:
|
| 99 |
return 1 # doc_a should come before doc_b
|
| 100 |
elif result_token_id == second_id:
|
requirements.txt
CHANGED
|
Binary files a/requirements.txt and b/requirements.txt differ
|
|
|