Spaces:
Sleeping
Sleeping
File size: 573 Bytes
3cc3626 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# 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}") |