Skip to content

Commit

Permalink
Small pipeline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RHRolun committed Dec 19, 2023
1 parent 79d9094 commit 4e8714f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lab-materials/05/detect_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ def batch_detect_objects(claim_ids = None):
detect_objects(claim_id)

if __name__ == '__main__':
batch_detect_objects([3])
batch_detect_objects()
11 changes: 1 addition & 10 deletions lab-materials/05/llm_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,4 @@ def similarity_metric(predicted_text, reference_text):
embedding_model = HuggingFaceEmbeddings()
evaluator = load_evaluator("embedding_distance", embeddings=embedding_model)
distance_score = evaluator.evaluate_strings(prediction=predicted_text, reference=reference_text)
return 1-distance_score["score"]

if __name__ == '__main__':
with open('example_text.txt') as f:
input_text = f.read()

with open('template.txt') as f:
template = f.read()

summarize_with_template(input_text, template)
return 1-distance_score["score"]

0 comments on commit 4e8714f

Please sign in to comment.