Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +12 -6
pages/Data Collection.py
CHANGED
|
@@ -881,13 +881,19 @@ elif st.session_state.current_page == "opencv_operations":
|
|
| 881 |
[OpenCV Documentation](https://docs.opencv.org/4.x/)
|
| 882 |
""")
|
| 883 |
|
| 884 |
-
# Button to display the Jupyter Notebook
|
| 885 |
if st.button("Open Jupyter Notebook"):
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 891 |
|
| 892 |
st.write("""
|
| 893 |
In the next section, we'll take a closer look at **image creation and manipulation using OpenCV**. We'll discuss:
|
|
|
|
| 881 |
[OpenCV Documentation](https://docs.opencv.org/4.x/)
|
| 882 |
""")
|
| 883 |
|
|
|
|
| 884 |
if st.button("Open Jupyter Notebook"):
|
| 885 |
+
try:
|
| 886 |
+
# URL to the hosted HTML notebook
|
| 887 |
+
notebook_url = "https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/Jupyter_Notes/images_page_2.html"
|
| 888 |
+
|
| 889 |
+
# Embed the notebook HTML file in the app
|
| 890 |
+
st.components.v1.html(f"""
|
| 891 |
+
<iframe src="{notebook_url}" width="100%" height="800px" style="border:none;"></iframe>
|
| 892 |
+
""", height=800, scrolling=True)
|
| 893 |
+
except Exception as e:
|
| 894 |
+
st.error("An error occurred while loading the notebook.")
|
| 895 |
+
st.write(e)
|
| 896 |
+
|
| 897 |
|
| 898 |
st.write("""
|
| 899 |
In the next section, we'll take a closer look at **image creation and manipulation using OpenCV**. We'll discuss:
|