File size: 574 Bytes
2144804
 
 
 
 
 
75e32f7
2144804
 
 
75e32f7
2144804
 
 
75e32f7
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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}")