import streamlit as st
import pandas as pd
dataset = st.file_uploader("upload file here", type = ['csv'])
df = pd.read_csv(dataset)
st.write('## Data set')
st.dataframe(df,3000,500)
The reason you are getting the error is that the variable dataset will be equal None when you have not uploaded a dataset yet. One way to fix your problem would be
import streamlit as st
import pandas as pd
dataset = st.file_uploader("upload file here", type = ['csv'])
if dataset is not None:
df = pd.read_csv(dataset)
st.write('## Data set')
st.dataframe(df,3000,500)