Spaces:
Sleeping
Sleeping
# File: components/notebook_view.py | |
import streamlit as st | |
def render_notebook(cells): | |
""" | |
Render reproducible code cells with run buttons. | |
""" | |
st.header("π Reproducible Notebook") | |
if not cells: | |
st.info("No notebook cells available.") | |
return | |
for idx, cell in enumerate(cells, 1): | |
st.subheader(f"Cell {idx}") | |
st.code(cell, language='python') | |
if st.button(f"Run Cell {idx}", key=f"run_{idx}"): | |
# Placeholder: In practice this would execute via MCP | |
st.success(f"Executed cell {idx}") |