MCP_Research / component /notebook_view.py
mgbam's picture
Update component/notebook_view.py
2144804 verified
raw
history blame
526 Bytes
# Notebook view component
# File: components/notebook_view.py
import streamlit as st
def render_notebook(cells):
"""
Render a sequence of code cells as a live notebook view.
Args:
cells (List[str]): Each string is a code cell to display.
"""
st.header("πŸ““ Reproducible Notebook")
if not cells:
st.info("No notebook cells available for this paper.")
return
for idx, cell in enumerate(cells, 1):
st.subheader(f"Cell {idx}")
st.code(cell, language='python')