Spaces:
Sleeping
Sleeping
File size: 531 Bytes
208266a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import os
from datasets import load_dataset
from collections import Counter
from src.config import HF_ENDPOINT, HF_TOKEN
if HF_ENDPOINT:
os.environ["HF_ENDPOINT"] = HF_ENDPOINT
def fetch_and_inspect_data():
try:
dataset = load_dataset("mediabiasgroup/BABE", token=HF_TOKEN)
print(Counter(dataset["train"]["label"]))
print(Counter(dataset["train"]["label_opinion"]))
except Exception as e:
print(f"Failed to load dataset: {e}")
if __name__ == "__main__":
fetch_and_inspect_data()
|