Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +14 -5
pages/Data Collection.py
CHANGED
|
@@ -883,11 +883,20 @@ elif st.session_state.current_page == "opencv_operations":
|
|
| 883 |
|
| 884 |
if st.button("Open Jupyter Notebook"):
|
| 885 |
try:
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 891 |
|
| 892 |
|
| 893 |
st.write("""
|
|
|
|
| 883 |
|
| 884 |
if st.button("Open Jupyter Notebook"):
|
| 885 |
try:
|
| 886 |
+
# Fetch the HTML file from the Hugging Face link
|
| 887 |
+
url = "https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/Jupyter_Notes/images_page_2.html"
|
| 888 |
+
response = requests.get(url)
|
| 889 |
+
|
| 890 |
+
# Check if the response is successful
|
| 891 |
+
if response.status_code == 200:
|
| 892 |
+
notebook_html = response.text
|
| 893 |
+
# Render the HTML content in Streamlit
|
| 894 |
+
st.components.v1.html(notebook_html, height=1000, scrolling=True)
|
| 895 |
+
else:
|
| 896 |
+
st.error(f"Failed to load the notebook. HTTP Status: {response.status_code}")
|
| 897 |
+
|
| 898 |
+
except Exception as e:
|
| 899 |
+
st.error(f"An error occurred: {e}")
|
| 900 |
|
| 901 |
|
| 902 |
st.write("""
|