File size: 762 Bytes
f9f24ec
 
 
 
7ecbb3e
2319432
 
f9f24ec
7ecbb3e
f9f24ec
 
7ecbb3e
f9f24ec
 
 
2319432
 
 
f9f24ec
89247af
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import streamlit as st
import json
from datasets import load_dataset

st.set_page_config(page_title="Kaggle Notebooks inspection", layout="wide")

st.markdown("<h1 style='text-align: center; color: #00BFFF;'>Kaggle Notebooks inspection 🔍</h1>", unsafe_allow_html=True)

st.markdown("Here you can inspect Kaggle notebooks that were converted to python scripts and deduplicated.")
@st.cache()
def load_data():
    ds = load_dataset("loubnabnl/kaggle_scripts_dedup_subset", split="train")
    return ds

samples = load_data()
#col1, _ = st.columns([2, 4])
#with col1:
index_example = st.number_input(f"Index of the chosen sample from the existing {len(samples)}", min_value=0, max_value=len(samples)-1, value=0, step=1)

st.code(samples[index_example]["script"])