import streamlit as st from streamlit_lottie import st_lottie import requests # Function to load Lottie animations def load_lottieurl(url: str): try: r = requests.get(url) r.raise_for_status() # Will raise an exception for 4xx/5xx errors return r.json() except requests.exceptions.RequestException as e: # Log the error if the URL is not accessible or if there is any issue st.error(f"Error loading Lottie animation from {url}: {e}") return None # Load animations robot_animation = load_lottieurl("https://lottie.host/45619748-3867-4f57-8f50-cac297eca2da/1q98CFxp2I.json") hero_animation = load_lottieurl("https://assets9.lottiefiles.com/packages/lf20_touohxv0.json") data_science_animation = load_lottieurl("https://assets9.lottiefiles.com/packages/lf20_jcikwtux.json") ml_animation = load_lottieurl("https://lottie.host/e4bb50e7-3033-4642-b51b-05b703d86236/yje0T0dWeq.json") # New URL for ML animation dl_animation = load_lottieurl("https://assets10.lottiefiles.com/packages/lf20_kuhijlvx.json") gen_ai_animation = load_lottieurl("https://assets4.lottiefiles.com/packages/lf20_x62chJ.json") # Home Page st.title("Zero to Hero in Machine Learning 🌟") if hero_animation: # Only show if the animation was successfully loaded st_lottie(hero_animation, height=300, key="hero") st.header("About the Author 📖") if robot_animation: st_lottie(robot_animation, height=300, key="robot") st.write(""" Hi, I'm Phaneendra Bharadwaj, an aspiring data scientist and machine learning enthusiast. Here's a bit about me: - **Skills:** Python, Exploratory Data Analysis, Machine Learning, Deep Learning, Generative AI. - **Experience:** I'm a Fresher, working on various ML related projects. """) st.markdown( """
Hey User! Are you Ready??
""", unsafe_allow_html=True ) # Sections st.subheader("📊 Data Science") if data_science_animation: st_lottie(data_science_animation, height=200, key="data_science") st.write(""" Data Science involves extracting insights from data using statistical techniques. **Example:** Predicting sales based on historical data. """) st.subheader("🤖 Machine Learning") if ml_animation: st_lottie(ml_animation, height=200, key="machine_learning") st.write(""" Machine Learning is a tool used to learn the data from Natural Intelligence,it is a tool used to mimic/copy Natural Intelligence.This uses statistical concepts to mimic /copy learning ability. **Example:** Spam email detection. """) st.subheader("🧠 Deep Learning") if dl_animation: st_lottie(dl_animation, height=200, key="deep_learning") st.write(""" Deep Learning is a subset of Machine Learning that uses neural networks.It is also a tool used to learn the data from Natural Intelligence. **Example:** Image recognition, like identifying cats in pictures. """) st.subheader("✨ Generative AI") if gen_ai_animation: st_lottie(gen_ai_animation, height=200, key="gen_ai") st.write(""" Generative AI creates new content by learning from existing data which we've learn't by using ML,DL from Natural Intelligence. **Example:** ChatGPT for generating human-like text responses. """) # Footer with animation st.write("---") st.markdown("**Let's embark and dive deep on this journey from Zero to Hero! 🚀**")