CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
huggingface

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: huggingface/notebooks
Path: blob/main/course/en/chapter10/section5.ipynb
Views: 2555
Kernel: Unknown Kernel

Use your annotated dataset

!pip install argilla
import argilla as rg HF_TOKEN = "..." # only for private spaces client = rg.Argilla( api_url="...", api_key="...", headers={"Authorization": f"Bearer {HF_TOKEN}"}, # only for private spaces )
dataset = client.datasets(name="ag_news")
status_filter = rg.Query(filter=rg.Filter([("status", "==", "completed")])) filtered_records = dataset.records(status_filter)
filtered_records.to_datasets().push_to_hub("argilla/ag_news_annotated")
dataset.to_hub(repo_id="argilla/ag_news_annotated")
dataset = rg.Dataset.from_hub(repo_id="argilla/ag_news_annotated")