File size: 526 Bytes
b0c6eb9
2144804
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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')