import streamlit as st import wandb import pandas as pd # Initialize W&B API api = wandb.Api() # Replace with your W&B entity and project name entity = "urbaniak-bruno-safescanai" project = "pytorch-intro" # Fetch all runs from the project runs = api.runs(f"{entity}/{project}") # Select a specific run (or create a dropdown for the user to select) run = runs[0] # Example: selecting the first run # Fetch the run data as a pandas DataFrame run_df = run.history() # Streamlit UI st.title("W&B Data in Streamlit") st.write(f"Displaying data for run: {run.name}") st.dataframe(run_df) # Example: Plotting a graph from the data st.line_chart(run_df[['epoch', 'accuracy']]) # Replace with appropriate columns