LakshmiHarika commited on
Commit
49ad621
·
verified ·
1 Parent(s): 495565f

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +9 -10
pages/Data Collection.py CHANGED
@@ -266,8 +266,7 @@ elif st.session_state.current_page == "explore_images_video":
266
  <h2 style="color: #BB3385;">Introduction to Images and Videos📸🖼️</h2>
267
  """, unsafe_allow_html=True)
268
 
269
- # Subheading 1: What is an Image?
270
- st.markdown("""
271
  <div style="text-align: left; margin-top: 20px;">
272
  <h3 style="color: #5b2c6f;">What is an Image?📊✨</h3>
273
  <p style="font-size: 16px; color: #333;">
@@ -279,8 +278,7 @@ elif st.session_state.current_page == "explore_images_video":
279
  </div>
280
  """, unsafe_allow_html=True)
281
 
282
- # Subheading 2: What is a Video?
283
- st.markdown("""
284
  <div style="text-align: left; margin-top: 20px;">
285
  <h3 style="color: #5b2c6f;">What is a Video?🎥✨</h3>
286
  <p style="font-size: 16px; color: #333;">
@@ -294,12 +292,11 @@ elif st.session_state.current_page == "explore_images_video":
294
  </div>
295
  """, unsafe_allow_html=True)
296
 
297
- # Subheading 3: Why is an Image Called a Grid-Like Structure?
298
- st.markdown("""
299
  <div style="text-align: left; margin-top: 20px;">
300
  <h3 style="color: #5b2c6f;">Why is an Image Called a Grid-Like Structure?🔲✨</h3>
301
  <p style="font-size: 16px; color: #333;">
302
- Images are called **grid-like structures** because they are composed of **pixels** arranged in rows and columns,
303
  forming a rectangular grid. Each pixel contains information about **shape**, **color**, and **patterns**, which
304
  together define the image's content.
305
  The total number of pixels is determined by the image's height and width (resolution), and a higher resolution provides better clarity.
@@ -314,7 +311,7 @@ elif st.session_state.current_page == "explore_images_video":
314
  </p>
315
  </div>
316
  """, unsafe_allow_html=True)
317
- import streamlit as st
318
 
319
  # Visualization for Grid-Like Structure
320
  st.markdown("<h4 style='color: #BB3385;'>Image as a Grid Structure</h4>", unsafe_allow_html=True)
@@ -339,13 +336,15 @@ elif st.session_state.current_page == "explore_images_video":
339
  ax.set_xticklabels([f'Col {j+1}' for j in range(width)], fontsize=4) # Smaller label size
340
  ax.set_yticklabels([f'Row {i+1}' for i in range(height)], fontsize=4) # Smaller label size
341
  ax.grid(color='white', linestyle='-', linewidth=0.5) # Thinner grid lines
342
- fig.colorbar(cax, ax=ax, orientation='vertical', label='Pixel Value', fontsize=4)
 
 
 
343
 
344
  # Display the plot
345
  st.pyplot(fig)
346
 
347
 
348
-
349
  # Go Back Button
350
  if st.button("Go Back"):
351
  navigate_to("main")
 
266
  <h2 style="color: #BB3385;">Introduction to Images and Videos📸🖼️</h2>
267
  """, unsafe_allow_html=True)
268
 
269
+ st.write("""
 
270
  <div style="text-align: left; margin-top: 20px;">
271
  <h3 style="color: #5b2c6f;">What is an Image?📊✨</h3>
272
  <p style="font-size: 16px; color: #333;">
 
278
  </div>
279
  """, unsafe_allow_html=True)
280
 
281
+ st.write("""
 
282
  <div style="text-align: left; margin-top: 20px;">
283
  <h3 style="color: #5b2c6f;">What is a Video?🎥✨</h3>
284
  <p style="font-size: 16px; color: #333;">
 
292
  </div>
293
  """, unsafe_allow_html=True)
294
 
295
+ st.write("""
 
296
  <div style="text-align: left; margin-top: 20px;">
297
  <h3 style="color: #5b2c6f;">Why is an Image Called a Grid-Like Structure?🔲✨</h3>
298
  <p style="font-size: 16px; color: #333;">
299
+ Images are called **grid-like structures because they are composed of **pixels** arranged in rows and columns,
300
  forming a rectangular grid. Each pixel contains information about **shape**, **color**, and **patterns**, which
301
  together define the image's content.
302
  The total number of pixels is determined by the image's height and width (resolution), and a higher resolution provides better clarity.
 
311
  </p>
312
  </div>
313
  """, unsafe_allow_html=True)
314
+
315
 
316
  # Visualization for Grid-Like Structure
317
  st.markdown("<h4 style='color: #BB3385;'>Image as a Grid Structure</h4>", unsafe_allow_html=True)
 
336
  ax.set_xticklabels([f'Col {j+1}' for j in range(width)], fontsize=4) # Smaller label size
337
  ax.set_yticklabels([f'Row {i+1}' for i in range(height)], fontsize=4) # Smaller label size
338
  ax.grid(color='white', linestyle='-', linewidth=0.5) # Thinner grid lines
339
+
340
+ # Color bar setup without fontsize argument
341
+ cbar = fig.colorbar(cax, ax=ax, orientation='vertical', label='Pixel Value')
342
+ cbar.ax.tick_params(labelsize=4) # Adjust the font size of the color bar
343
 
344
  # Display the plot
345
  st.pyplot(fig)
346
 
347
 
 
348
  # Go Back Button
349
  if st.button("Go Back"):
350
  navigate_to("main")