Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files882 unmodified lines883884885886887888889890891892893882 unmodified linesif st.button("Open Jupyter Notebook"):try:with open("images_page_2.html", "r", encoding="utf-8") as f:notebook_html = f.read()st.components.v1.html(notebook_html, height=800, scrolling=True)except FileNotFoundError:st.error("Notebook HTML file not found.")st.write("""882 unmodified lines883884885886887888889890891892893894895896897898899900901902882 unmodified linesif st.button("Open Jupyter Notebook"):try:# Fetch the HTML file from the Hugging Face linkurl = "https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/Jupyter_Notes/images_page_2.html"response = requests.get(url)# Check if the response is successfulif response.status_code == 200:notebook_html = response.text# Render the HTML content in Streamlitst.components.v1.html(notebook_html, height=1000, scrolling=True)else:st.error(f"Failed to load the notebook. HTTP Status: {response.status_code}")except Exception as e:st.error(f"An error occurred: {e}")st.write("""
pages/Data Collection.py+14-5