Skip to content

Commit

Permalink
Merge pull request #151 from AI4Bharat/minorchange-05
Browse files Browse the repository at this point in the history
changes for inter_ann_diff
  • Loading branch information
aparna-aa authored Jan 28, 2025
2 parents 057c057 + 0e8f5c2 commit 803bbcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/projects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ def add_extra_task_data(t, project):
similar_tasks = (
Task.objects.filter(input_data=t.input_data, project_id=project.id)
.filter(task_status=ANNOTATED)
.filter(review_user__isnull=True)
)
curr_response, seen, total_rating, key_values = {}, [], {}, {}
seen, total_rating, key_values = [], {}, {}
for st in similar_tasks:
ann = Annotation.objects.filter(task=st, annotation_status=LABELED)[0]
for r in ann.result:
if "model_responses_json" in r:
model_responses_json = r["model_responses_json"]
curr_response = {}
for mr in model_responses_json:
if "questions_response" in mr:
questions_response = mr["questions_response"]
Expand All @@ -553,7 +553,7 @@ def add_extra_task_data(t, project):
except Exception as e:
pass
break
seen.append(curr_response)
seen.append(curr_response)

for item in seen:
for key, value in item.items():
Expand Down

0 comments on commit 803bbcb

Please sign in to comment.