Spaces:
Running
Running
import streamlit as st | |
import pandas as pd | |
import numpy as np | |
# Custom CSS for styling | |
custom_css = """ | |
<style> | |
html, body, [data-testid="stAppViewContainer"] { | |
background-image: linear-gradient( | |
rgba(0, 0, 0, 0.6), | |
rgba(0, 0, 0, 0.6) | |
), | |
url("https://www.istockphoto.com/photo/tech-or-space-background-abstract-3d-illustration-gm1367865109-437999705?utm_source=pixabay&utm_medium=affiliate&utm_campaign=SRP_photo_sponsored&utm_content=https%3A%2F%2Fpixabay.com%2Fphotos%2Fsearch%2Fbackground%2520datascience%2F&utm_term=background+datascience.jpg"); | |
background-size: cover; | |
background-position: center; | |
background-repeat: no-repeat; | |
background-attachment: fixed; | |
color: white; /* Ensures all text is readable */ | |
} | |
h2, h3 { | |
color: #FFD700; /* Gold color for headings */ | |
} | |
p { | |
color: #FFFFFF; /* White text for paragraphs */ | |
} | |
stButton>button:hover { | |
background-color: #45a049; /* Darker Green on hover */ | |
color:Balck; | |
} | |
.stButton>div:nth-child(1)>button { | |
background-color: #2196F3; /* Blue */ | |
} | |
.stButton>div:nth-child(2)>button { | |
background-color: #f44336; /* Green */ | |
} | |
.stButton>div:nth-child(3)>button { | |
background-color: #FF9800; /* Orange */ | |
} | |
</style> | |
""" | |
# Inject the CSS into the app | |
st.markdown(custom_css, unsafe_allow_html=True) | |
# What is an Image | |
st.markdown("<h2 style='text-align: left; color: Black;'>Project-1</h2>", unsafe_allow_html=True) | |
st.markdown("<h3 style='text-align: left; color: Black;'>Dont Drink & Drive (animation using opencv)</h3>", unsafe_allow_html=True) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"Designed engaging environments using cv2.line, cv2.circle, and cv2.rectangle for elements like roads, vehicles, and characters." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"Delivered strong messages like “Don’t Drink and Drive” with cv2.putText to enhance awareness." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"Enabled user-driven customization through cv2.setMouseCallback, making the experience interactive and fun." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"Visualized the story in real-time using cv2.imshow and cv2.waitKey for seamless execution." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown("<h3 style='text-align: left; color: Black;'>GIF Creation (animation using opencv)</h3>", unsafe_allow_html=True) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"Produced captivating GIFs showcasing dynamic scenes where shapes, texts, and animations flow smoothly to engage the audience." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"cv2.line, cv2.circle: To craft essential shapes." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"cv2.putText: For adding meaningful annotations." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White; font-style: italic;'>" | |
"cv2.imshow, cv2.waitKey: To bring animations to life frame by frame." | |
"</p>", | |
unsafe_allow_html=True | |
) | |
st.markdown( | |
"<p style='font-size: 16px; color: White;'>" | |
"You can explore the code examples on GitHub:<br>" | |
"<a href='https://github.com/Sathwik4119/IMAGE/blob/main/project_opencv.ipynb' target='_blank' style='color: #FFD700;'>Project</a><br>" | |
"</p>", | |
unsafe_allow_html=True | |
) | |