Skip to content

Commit

Permalink
Add missing colors (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasnerz authored Dec 4, 2024
1 parent 527fda1 commit ed12c0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion factgenie/datasets/propaganda_techniques.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"#8f0e42", # Dark Pink
"#095700", # Dark Green
"#FFD700", # Gold
"#FF4500", # Orange Red
"#8B4513", # Saddle Brown
]


Expand Down Expand Up @@ -270,6 +272,7 @@ def download(

short_categories = [{"name": c["name"], "color": c["color"], "description": ""} for c in PCT_span_categories]
categories_names = [c["name"] for c in short_categories]

# save outputs
outputs_jsonl_parent = out_download_dir / dataset_id
outputs_jsonl_parent.mkdir(parents=True, exist_ok=True)
Expand Down Expand Up @@ -360,7 +363,8 @@ def _load_example_annotations(
try:
type_idx = categories_names.index(category)
except ValueError:
__import__("ipdb").set_trace()
logger.warning(f"Category {category} not found in categories_names")
continue

annotation_d = {
"reason": "",
Expand Down

0 comments on commit ed12c0c

Please sign in to comment.