import streamlit as st
# --- Page Config ---
st.set_page_config(page_title="AI Classifier and Clustering Explorer", page_icon="🤖", layout="wide")
# --- Project Info Section ---
st.markdown(
"""
🌟 AI Classifier and Clustering Explorer 🌟
Explore ML Algorithms Visually & Analyze Performance
Project Description: This project visualizes different machine learning models and their performance on classification and clustering tasks using various datasets.
Team Members: Ahmad Raza, Hamima Zulfiqar, Aqsa Zia
""",
unsafe_allow_html=True
)
st.markdown("---")
# --- Sidebar Buttons ---
st.sidebar.title("🔘 Choose a Task")
st.sidebar.markdown("## 📚 Classifiers")
knn_clicked = st.sidebar.button("🔵 KNN: Diagram & Prediction")
naive_bayes_clicked = st.sidebar.button("🟢 Naive Bayes: Prediction")
random_forest_clicked = st.sidebar.button("🟠 Random Forest: Prediction")
st.sidebar.markdown("## 🎨 Clustering")
kmeans_clicked = st.sidebar.button("🔴 K-Means: Visualization")
st.sidebar.markdown("## 📊 Comparison")
comparison_clicked = st.sidebar.button("📈 Compare All Models")
# --- Main Area Display based on Button Click ---
if knn_clicked:
st.header("🔵 K-Nearest Neighbors (KNN)")
st.image("KNN.PNG", caption="KNN Diagram", use_container_width=True)
if naive_bayes_clicked:
st.header("🟢 Naive Bayes Classifier")
st.write("You selected Naive Bayes. Running prediction...")
st.image("Naive Baies.PNG", caption="ConfusionMatric for NaiveBaise", use_container_width=True)
if random_forest_clicked:
st.header("🟠 Random Forest Classifier")
st.write("You selected Random Forest. Running prediction...")
st.image("Random Forest.PNG", caption="ConfusionMatric for Random Forest", use_container_width=True)
if kmeans_clicked:
st.header("🔴 K-Means Clustering")
st.write("You selected K-Means Clustering. Running visualization...")
st.image("Clustering.PNG", caption="ConfusionMatric for K-Means", use_container_width=True)
if comparison_clicked:
st.header("📈 Model Performance Comparison")
st.write("Comparing performance of all models...")
st.image("Comparison.PNG", caption="ConfusionMatric for K-Means", use_container_width=True)
# --- Footer ---
st.markdown("---")
st.markdown(
"""
Made with ❤️ by Team Volund
""",
unsafe_allow_html=True
)