Spaces:
Sleeping
Sleeping
from datasets import load_dataset | |
import pandas as pd | |
from embedding_atlas.widget import EmbeddingAtlasWidget | |
# Hardcode the name of the Hugging Face dataset | |
dataset_name = "Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset" | |
# Load the dataset from Hugging Face | |
# The load_dataset function can download datasets from the Hub. [3, 5, 6] | |
dataset = load_dataset(dataset_name, split="train") | |
# Convert the dataset to a Pandas DataFrame | |
# The .to_pandas() method is a convenient way to do this. | |
df = dataset.to_pandas() | |
# Show the Embedding Atlas widget for your data frame | |
# The widget takes a Pandas DataFrame as its primary input. [4] | |
EmbeddingAtlasWidget(df) |