TransformerAnalyzer / render_util.py
Alan Liu
add arithmetic intensity
6aa1c8b
raw
history blame
566 Bytes
import streamlit as st
def create_table(df):
# Table header based on df columns
header = "| " + " | ".join(df.columns) + " |"
# Number of columns in df to set table divider accordingly
divider = "|:---|" + "|-----:|" * len(df.columns[:-1])
rows = [header, divider]
for _, row in df.iterrows():
rows.append("| " + " | ".join(row.astype(str)) + " |")
return "\n".join(rows)
def header3(text):
st.markdown(f"### {text}")
def header4(text):
st.markdown(f"#### {text}")
def header5(text):
st.markdown(f"##### {text}")