Skip to content

Instantly share code, notes, and snippets.

@AntoineToubhans
Last active June 22, 2021 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntoineToubhans/b5255d5e21e644948d372f82a5b4fa6e to your computer and use it in GitHub Desktop.
Save AntoineToubhans/b5255d5e21e644948d372f82a5b4fa6e to your computer and use it in GitHub Desktop.
import dvc.api
import pandas as pd
@st.cache
def load_predictions(rev: str) -> pd.DataFrame:
with dvc.api.open("data/evaluation/predictions.csv", rev=rev) as f:
return pd.read_csv(f)
selected_commit = ... # Use the commit selector introduced previous section
predictions = load_predictions(rev=selected_commit.hexsha)
st.dataframe(predictions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment