Spaces:
Sleeping
Sleeping
File size: 766 Bytes
2d4811a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
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)
|