NCTCMumbai's picture
Upload 24 files
e5b3236 verified
raw
history blame
512 Bytes
import streamlit as st
def model_analytics(session_state, config):
COST_PER_1000_TOKENS_USD = config["COST_PER_1000_TOKENS_USD"]
st.markdown("# Model Analytics")
st.write("Total tokens used :", session_state["tokens_used"])
st.write("Speed :", session_state["tps"], " tokens/sec")
st.write(
"Total cost incurred :",
round(
COST_PER_1000_TOKENS_USD * session_state["tokens_used"] / 1000,
3,
),
"USD",
)
st.markdown("---")