Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +82 -53
pages/Data Collection.py
CHANGED
|
@@ -881,23 +881,6 @@ elif st.session_state.current_page == "opencv_operations":
|
|
| 881 |
[OpenCV Documentation](https://docs.opencv.org/4.x/)
|
| 882 |
""")
|
| 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("""
|
| 903 |
In the next section, we'll take a closer look at **image creation and manipulation using OpenCV**. We'll discuss:
|
|
@@ -908,19 +891,33 @@ elif st.session_state.current_page == "opencv_operations":
|
|
| 908 |
Curious to learn more?👇Click **Explore Image Creation and Manipulation** to continue your journey with OpenCV! 🚀
|
| 909 |
""")
|
| 910 |
|
| 911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 912 |
|
| 913 |
with col2:
|
| 914 |
-
if st.button("
|
| 915 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 916 |
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
navigate_to("opencv_operations") # Previous page: Image Operations with OpenCV
|
| 920 |
|
| 921 |
with col3:
|
| 922 |
-
if st.button("
|
| 923 |
-
navigate_to("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 924 |
|
| 925 |
elif st.session_state.current_page == "image_operations":
|
| 926 |
|
|
@@ -1159,22 +1156,33 @@ elif st.session_state.current_page == "image_operations":
|
|
| 1159 |
Stay tuned for an exciting exploration of video handling!
|
| 1160 |
""")
|
| 1161 |
|
| 1162 |
-
|
| 1163 |
-
|
| 1164 |
-
#
|
| 1165 |
with col1:
|
| 1166 |
-
|
| 1167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1168 |
|
| 1169 |
-
# Column 2 - Button for the main page (Images & Videos)
|
| 1170 |
with col2:
|
| 1171 |
-
if st.button("
|
| 1172 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1173 |
|
| 1174 |
-
#
|
|
|
|
|
|
|
| 1175 |
with col3:
|
| 1176 |
-
if st.button("
|
| 1177 |
-
navigate_to("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1178 |
|
| 1179 |
|
| 1180 |
elif st.session_state.current_page == "video_processing":
|
|
@@ -1469,22 +1477,33 @@ elif st.session_state.current_page == "video_processing":
|
|
| 1469 |
Get ready to learn about powerful image transformation techniques!
|
| 1470 |
""")
|
| 1471 |
|
| 1472 |
-
col1, col2
|
| 1473 |
|
| 1474 |
-
#
|
| 1475 |
with col1:
|
| 1476 |
-
|
| 1477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1478 |
|
| 1479 |
-
# Column 2 - Button for the main page (Images & Videos)
|
| 1480 |
with col2:
|
| 1481 |
-
if st.button("
|
| 1482 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1483 |
|
| 1484 |
-
#
|
|
|
|
|
|
|
| 1485 |
with col3:
|
| 1486 |
-
if st.button("
|
| 1487 |
-
navigate_to("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1488 |
|
| 1489 |
elif st.session_state.current_page == "image_transformations":
|
| 1490 |
# Content for Image Transformations Page
|
|
@@ -1799,23 +1818,33 @@ elif st.session_state.current_page == "image_transformations":
|
|
| 1799 |
cv2.destroyAllWindows()
|
| 1800 |
""", language="python")
|
| 1801 |
|
| 1802 |
-
|
| 1803 |
-
col1, col2, col3 = st.columns(3)
|
| 1804 |
|
| 1805 |
-
#
|
| 1806 |
with col1:
|
| 1807 |
-
|
| 1808 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1809 |
|
| 1810 |
-
# Column 2 - Button for the main page (Images & Videos)
|
| 1811 |
with col2:
|
| 1812 |
-
if st.button("
|
| 1813 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1814 |
|
| 1815 |
-
#
|
|
|
|
|
|
|
| 1816 |
with col3:
|
| 1817 |
-
if st.button("
|
| 1818 |
-
navigate_to("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1819 |
|
| 1820 |
|
| 1821 |
if st.session_state.current_page == "opencv_projects":
|
|
|
|
| 881 |
[OpenCV Documentation](https://docs.opencv.org/4.x/)
|
| 882 |
""")
|
| 883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 884 |
|
| 885 |
st.write("""
|
| 886 |
In the next section, we'll take a closer look at **image creation and manipulation using OpenCV**. We'll discuss:
|
|
|
|
| 891 |
Curious to learn more?👇Click **Explore Image Creation and Manipulation** to continue your journey with OpenCV! 🚀
|
| 892 |
""")
|
| 893 |
|
| 894 |
+
# First row: Colab Notes and Main Page
|
| 895 |
+
col1, col2 = st.columns(2)
|
| 896 |
+
|
| 897 |
+
with col1:
|
| 898 |
+
st.markdown("""
|
| 899 |
+
<a href="https://colab.research.google.com/drive/1P9nT1HmOcCah5nTctxCm7hVdqqYPUkzn?usp=sharing" target="_blank">
|
| 900 |
+
<button style="background-color: #4CAF50; color: white; padding: 10px; font-size: 16px; border: none; cursor: pointer;">
|
| 901 |
+
Colab Notes
|
| 902 |
+
</button>
|
| 903 |
+
</a>
|
| 904 |
+
""", unsafe_allow_html=True)
|
| 905 |
|
| 906 |
with col2:
|
| 907 |
+
if st.button("Main Page"):
|
| 908 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 909 |
|
| 910 |
+
# Second row: Previous Page and Next Page
|
| 911 |
+
col3, col4 = st.columns(2)
|
|
|
|
| 912 |
|
| 913 |
with col3:
|
| 914 |
+
if st.button("⬅️ Intro Page"):
|
| 915 |
+
navigate_to("explore_images_video") # Previous page: Introduction to Images and Videos
|
| 916 |
+
|
| 917 |
+
with col4:
|
| 918 |
+
if st.button("➡️ Next Page"):
|
| 919 |
+
navigate_to("image_operations") # Next page: Explore Image Creation and Manipulation
|
| 920 |
+
|
| 921 |
|
| 922 |
elif st.session_state.current_page == "image_operations":
|
| 923 |
|
|
|
|
| 1156 |
Stay tuned for an exciting exploration of video handling!
|
| 1157 |
""")
|
| 1158 |
|
| 1159 |
+
col1, col2 = st.columns(2)
|
| 1160 |
+
|
| 1161 |
+
# First row: Colab Notes and Main Page
|
| 1162 |
with col1:
|
| 1163 |
+
st.markdown("""
|
| 1164 |
+
<a href="https://colab.research.google.com/drive/126XjnPWAmXB623-1KmerDT_fsJKH6Gc4?usp=sharing" target="_blank">
|
| 1165 |
+
<button style="background-color: #4CAF50; color: white; padding: 10px; font-size: 16px; border: none; cursor: pointer;">
|
| 1166 |
+
Colab Notes
|
| 1167 |
+
</button>
|
| 1168 |
+
</a>
|
| 1169 |
+
""", unsafe_allow_html=True)
|
| 1170 |
|
|
|
|
| 1171 |
with col2:
|
| 1172 |
+
if st.button("Main Page"):
|
| 1173 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1174 |
|
| 1175 |
+
# Second row: Previous Page and Next Page
|
| 1176 |
+
col3, col4 = st.columns(2)
|
| 1177 |
+
|
| 1178 |
with col3:
|
| 1179 |
+
if st.button("⬅️ Prev Page"):
|
| 1180 |
+
navigate_to("opencv_operations") # Previous page: Image Operations with OpenCV
|
| 1181 |
+
|
| 1182 |
+
with col4:
|
| 1183 |
+
if st.button("➡️ Next Page"):
|
| 1184 |
+
navigate_to("video_processing") # Next page: Video Processing with OpenCV
|
| 1185 |
+
|
| 1186 |
|
| 1187 |
|
| 1188 |
elif st.session_state.current_page == "video_processing":
|
|
|
|
| 1477 |
Get ready to learn about powerful image transformation techniques!
|
| 1478 |
""")
|
| 1479 |
|
| 1480 |
+
col1, col2 = st.columns(2)
|
| 1481 |
|
| 1482 |
+
# First row: Colab Notes and Main Page
|
| 1483 |
with col1:
|
| 1484 |
+
st.markdown("""
|
| 1485 |
+
<a href="https://colab.research.google.com/drive/1zzovaAr4NNJoJSR-lA9ApSyPguLKf3UB?usp=sharing" target="_blank">
|
| 1486 |
+
<button style="background-color: #4CAF50; color: white; padding: 10px; font-size: 16px; border: none; cursor: pointer;">
|
| 1487 |
+
Colab Notes
|
| 1488 |
+
</button>
|
| 1489 |
+
</a>
|
| 1490 |
+
""", unsafe_allow_html=True)
|
| 1491 |
|
|
|
|
| 1492 |
with col2:
|
| 1493 |
+
if st.button("Main Page"):
|
| 1494 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1495 |
|
| 1496 |
+
# Second row: Previous Page and Next Page
|
| 1497 |
+
col3, col4 = st.columns(2)
|
| 1498 |
+
|
| 1499 |
with col3:
|
| 1500 |
+
if st.button("⬅️ Prev Page"):
|
| 1501 |
+
navigate_to("image_operations") # Previous page: Explore Image Creation and Manipulation
|
| 1502 |
+
|
| 1503 |
+
with col4:
|
| 1504 |
+
if st.button("➡️ Next Page"):
|
| 1505 |
+
navigate_to("image_transformations") # Next page: Image Transformations with OpenCV
|
| 1506 |
+
|
| 1507 |
|
| 1508 |
elif st.session_state.current_page == "image_transformations":
|
| 1509 |
# Content for Image Transformations Page
|
|
|
|
| 1818 |
cv2.destroyAllWindows()
|
| 1819 |
""", language="python")
|
| 1820 |
|
| 1821 |
+
col1, col2 = st.columns(2)
|
|
|
|
| 1822 |
|
| 1823 |
+
# First row: Colab Notes and Main Page
|
| 1824 |
with col1:
|
| 1825 |
+
st.markdown("""
|
| 1826 |
+
<a href="https://colab.research.google.com/drive/19mQM-7VY0F0y9NyecrhbU5kyOY9j9oIk?usp=sharing" target="_blank">
|
| 1827 |
+
<button style="background-color: #4CAF50; color: white; padding: 10px; font-size: 16px; border: none; cursor: pointer;">
|
| 1828 |
+
Colab Notes
|
| 1829 |
+
</button>
|
| 1830 |
+
</a>
|
| 1831 |
+
""", unsafe_allow_html=True)
|
| 1832 |
|
|
|
|
| 1833 |
with col2:
|
| 1834 |
+
if st.button("Main Page"):
|
| 1835 |
navigate_to("explore_images_video") # Main page: Images & Videos
|
| 1836 |
|
| 1837 |
+
# Second row: Previous Page and Next Page
|
| 1838 |
+
col3, col4 = st.columns(2)
|
| 1839 |
+
|
| 1840 |
with col3:
|
| 1841 |
+
if st.button("⬅️ Prev Page"):
|
| 1842 |
+
navigate_to("video_processing") # Previous page: Video Processing with OpenCV
|
| 1843 |
+
|
| 1844 |
+
with col4:
|
| 1845 |
+
if st.button("➡️ Next Page"):
|
| 1846 |
+
navigate_to("opencv_projects") # Next page: OpenCV Projects
|
| 1847 |
+
|
| 1848 |
|
| 1849 |
|
| 1850 |
if st.session_state.current_page == "opencv_projects":
|