import streamlit as st from PIL import Image import base64 from io import BytesIO # Function to convert image to base64 for hover effect def get_image_base64(image_path): img = Image.open(image_path) buffered = BytesIO() img.save(buffered, format="jpg") return base64.b64encode(buffered.getvalue()).decode() # Set page configuration st.set_page_config( page_title="ML Projects Portfolio", page_icon="📊", layout="wide" ) # Custom CSS for styling st.markdown(""" """, unsafe_allow_html=True) # Header st.markdown('

Machine Learning Projects Portfolio

', unsafe_allow_html=True) st.markdown('

Click on any project image to explore

', unsafe_allow_html=True) # Create three columns for layout col1, col2, col3 = st.columns(3) # Project data actual project links) projects = [ { "title": "FCCU 'LCO D 95' Lab Value Prediction App", "image": "refinery.jpg", # image path "url": "https://models-rhhj7lfypshz87uadtsqnp.streamlit.app/", "description": "Predicts '95% Distillation' of Diesel" }, { "title": "CDU SRN 'RVP' Prediction Tool", "image": "flask3.jpg", # image path "url": "https://huggingface.co/spaces/basheer67/SRN_RVP", "description": "Predicts 'Ried Vapour Pressure' of Naptha" }, { "title": "Old Car Price Prediction", "image": "car.jpg", # image path "url": "https://models-efsxczfpjxgyjw4h3tavch.streamlit.app/", "description": "Predict prices of used cars using ML" }, { "title": "Indian Weather monitoring app", "image": "weather.jpg", # image path "url": "https://huggingface.co/spaces/basheer67/basheer-models", "description": "Retrieves weather data of Indian cities" }, { "title": "Depression Proneness Predictor", "image": "dep1.jpg", # image path "url": "https://huggingface.co/spaces/basheer67/mental_health", "description": "Predicts depression proneness using deep learning" }, { "title": "Telegram bot of Chemical Engineering formulae", "image": "data.jpg", # Replace with your image path "url": "https://your-data-price-project-link.com", "description": "Telegram bot of formulae" } ] # Display projects in columns for i, project in enumerate(projects): # Place projects in appropriate columns if i % 3 == 0: current_col = col1 elif i % 3 == 1: current_col = col2 else: current_col = col3 with current_col: # Create a container for each project with st.container(): st.markdown(f'
', unsafe_allow_html=True) # Display image with hyperlink try: img = Image.open(project["image"]) st.image( img, caption=project["title"], use_container_width=True, output_format="jpg" ) # Create clickable area if st.button("View Project", key=f"btn_{i}"): st.markdown(f'', unsafe_allow_html=True) except FileNotFoundError: st.error(f"Image for {project['title']} not found") st.write(project["description"]) st.markdown('
', unsafe_allow_html=True) st.write("---") # Footer st.markdown("""

Developed by SKB | © 2025

""", unsafe_allow_html=True)