ceyda's picture
Duplicate from aseifert/ExplaiNER
2d4811a
raw
history blame contribute delete
766 Bytes
import streamlit as st
from pip._internal.operations import freeze
from src.subpages.page import Context, Page
class DebugPage(Page):
name = "Debug"
icon = "bug"
def render(self, context: Context):
st.title(self.name)
# with st.expander("💡", expanded=True):
# st.write("Some debug info.")
st.subheader("Installed Packages")
# get output of pip freeze from system
with st.expander("pip freeze"):
st.code("\n".join(freeze.freeze()))
st.subheader("Streamlit Session State")
st.json(st.session_state)
st.subheader("Tokenizer")
st.code(context.tokenizer)
st.subheader("Model")
st.code(context.model.config)
st.code(context.model)