Spaces:
Sleeping
Sleeping
Update pages/project.py
Browse files- pages/project.py +96 -0
pages/project.py
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
# Custom CSS for styling
|
| 6 |
+
custom_css = """
|
| 7 |
+
<style>
|
| 8 |
+
html, body, [data-testid="stAppViewContainer"] {
|
| 9 |
+
background-image: linear-gradient(
|
| 10 |
+
rgba(0, 0, 0, 0.6),
|
| 11 |
+
rgba(0, 0, 0, 0.6)
|
| 12 |
+
),
|
| 13 |
+
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");
|
| 14 |
+
background-size: cover;
|
| 15 |
+
background-position: center;
|
| 16 |
+
background-repeat: no-repeat;
|
| 17 |
+
background-attachment: fixed;
|
| 18 |
+
color: white; /* Ensures all text is readable */
|
| 19 |
+
}
|
| 20 |
+
h2, h3 {
|
| 21 |
+
color: #FFD700; /* Gold color for headings */
|
| 22 |
+
}
|
| 23 |
+
p {
|
| 24 |
+
color: #FFFFFF; /* White text for paragraphs */
|
| 25 |
+
}
|
| 26 |
+
stButton>button:hover {
|
| 27 |
+
background-color: #45a049; /* Darker Green on hover */
|
| 28 |
+
color:Balck;
|
| 29 |
+
}
|
| 30 |
+
.stButton>div:nth-child(1)>button {
|
| 31 |
+
background-color: #2196F3; /* Blue */
|
| 32 |
+
}
|
| 33 |
+
.stButton>div:nth-child(2)>button {
|
| 34 |
+
background-color: #f44336; /* Green */
|
| 35 |
+
}
|
| 36 |
+
.stButton>div:nth-child(3)>button {
|
| 37 |
+
background-color: #FF9800; /* Orange */
|
| 38 |
+
}
|
| 39 |
+
</style>
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
# Inject the CSS into the app
|
| 43 |
+
st.markdown(custom_css, unsafe_allow_html=True)
|
| 44 |
+
|
| 45 |
+
# What is an Image
|
| 46 |
+
st.markdown("<h2 style='text-align: left; color: Black;'>Project-1</h2>", unsafe_allow_html=True)
|
| 47 |
+
st.markdown("<h3 style='text-align: left; color: Black;'>Dont Drink & Drive (animation using opencv)</h3>", unsafe_allow_html=True)
|
| 48 |
+
st.markdown(
|
| 49 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 50 |
+
"Designed engaging environments using cv2.line, cv2.circle, and cv2.rectangle for elements like roads, vehicles, and characters."
|
| 51 |
+
"</p>",
|
| 52 |
+
unsafe_allow_html=True
|
| 53 |
+
)
|
| 54 |
+
st.markdown(
|
| 55 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 56 |
+
"Delivered strong messages like “Don’t Drink and Drive” with cv2.putText to enhance awareness."
|
| 57 |
+
"</p>",
|
| 58 |
+
unsafe_allow_html=True
|
| 59 |
+
)
|
| 60 |
+
st.markdown(
|
| 61 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 62 |
+
"Enabled user-driven customization through cv2.setMouseCallback, making the experience interactive and fun."
|
| 63 |
+
"</p>",
|
| 64 |
+
unsafe_allow_html=True
|
| 65 |
+
)
|
| 66 |
+
st.markdown(
|
| 67 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 68 |
+
"Visualized the story in real-time using cv2.imshow and cv2.waitKey for seamless execution."
|
| 69 |
+
"</p>",
|
| 70 |
+
unsafe_allow_html=True
|
| 71 |
+
)
|
| 72 |
+
st.st.markdown("<h3 style='text-align: left; color: Black;'>GIF Creation (animation using opencv)</h3>", unsafe_allow_html=True)
|
| 73 |
+
st.markdown(
|
| 74 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 75 |
+
"Produced captivating GIFs showcasing dynamic scenes where shapes, texts, and animations flow smoothly to engage the audience."
|
| 76 |
+
"</p>",
|
| 77 |
+
unsafe_allow_html=True
|
| 78 |
+
)
|
| 79 |
+
st.markdown(
|
| 80 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 81 |
+
"cv2.line, cv2.circle: To craft essential shapes."
|
| 82 |
+
"</p>",
|
| 83 |
+
unsafe_allow_html=True
|
| 84 |
+
)
|
| 85 |
+
st.markdown(
|
| 86 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 87 |
+
"cv2.putText: For adding meaningful annotations."
|
| 88 |
+
"</p>",
|
| 89 |
+
unsafe_allow_html=True
|
| 90 |
+
)
|
| 91 |
+
st.markdown(
|
| 92 |
+
"<p style='font-size: 16px; color: White; font-style: italic;'>"
|
| 93 |
+
"cv2.imshow, cv2.waitKey: To bring animations to life frame by frame."
|
| 94 |
+
"</p>",
|
| 95 |
+
unsafe_allow_html=True
|
| 96 |
+
)
|