Spaces:
Sleeping
Sleeping
import streamlit as st | |
from datasets import load_dataset | |
import pandas as pd | |
st.title("Explore Hugging Face Dataset") | |
dataset = load_dataset("ag_news", split="train[:1000]") | |
df = pd.DataFrame(dataset) | |
st.write("Sample data:", df.head()) | |
st.write("Category Distribution") | |
st.bar_chart(df["label"].value_counts()) | |