shwetashweta05 commited on
Commit
141b341
·
verified ·
1 Parent(s): a3c6f73

Update pages/Projects.py

Browse files
Files changed (1) hide show
  1. pages/Projects.py +16 -0
pages/Projects.py CHANGED
@@ -5,4 +5,20 @@ import numpy as np
5
  if st.button("**How to convert Image to tabular data**"):
6
  st.switch_page("pages/How to convert Image to tabular data.py")
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
 
5
  if st.button("**How to convert Image to tabular data**"):
6
  st.switch_page("pages/How to convert Image to tabular data.py")
7
 
8
+ import streamlit as st
9
+ from nbconvert import HTMLExporter
10
+ import nbformat
11
+
12
+ # Path to the notebook
13
+ notebook_path = "path_to_your_notebook.ipynb"
14
+
15
+ # Load and convert notebook to HTML
16
+ with open(notebook_path, "r", encoding="utf-8") as f:
17
+ notebook = nbformat.read(f, as_version=4)
18
+ html_exporter = HTMLExporter()
19
+ (html_body, resources) = html_exporter.from_notebook_node(notebook)
20
+
21
+ # Display notebook as HTML in Streamlit
22
+ st.components.v1.html(html_body, height=800, scrolling=True)
23
+
24