import os
from pathlib import Path

import pandas as pd
from datasets import Dataset
from dotenv import load_dotenv

load_dotenv(override=True)
current_dir = Path(os.path.dirname(os.path.abspath(__file__)))
task_metadata_path = current_dir / "task_metadata.json"

df = pd.read_json(task_metadata_path, orient="records")

dataset = Dataset.from_pandas(df)

dataset.push_to_hub(
    "smolagents/android_world",
    private=True,
    token=os.getenv("HF_TOKEN"),
)
