DATA_ENGINEER / app.py
TKM03's picture
Create app.py
01cde28 verified
raw
history blame
315 Bytes
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())