import streamlit as st import pandas as pd from huggingface_hub import hf_hub_download import os # Set your Hugging Face token from environment variable hf_token = os.getenv("pegelonline_dataset_read_only") if hf_token is None: st.error("Hugging Face token not found. Please set the HF_TOKEN environment variable.") else: # Download the dataset file dataset_path = hf_hub_download( repo_id="DSSG-Wasserwacht/pegelonline-dataset", filename="processed/stations.parquet", repo_type="dataset", use_auth_token=hf_token ) # Load the dataset df = pd.read_parquet(dataset_path) # Streamlit app st.title("Pegelonline Dataset Viewer") st.write("This app displays data from the Pegelonline dataset.") # Display the dataframe st.dataframe(df)