TKM03 commited on
Commit
01cde28
·
verified ·
1 Parent(s): ddd11e3

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from datasets import load_dataset
3
+ import pandas as pd
4
+
5
+ st.title("Explore Hugging Face Dataset")
6
+ dataset = load_dataset("ag_news", split="train[:1000]")
7
+
8
+ df = pd.DataFrame(dataset)
9
+ st.write("Sample data:", df.head())
10
+
11
+ st.write("Category Distribution")
12
+ st.bar_chart(df["label"].value_counts())