mohAhmad's picture
Update app.py
2dac8ea verified
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(
"""
<div style="text-align: center;">
<h1 style="color: #4CAF50;">🌟 AI Classifier and Clustering Explorer 🌟</h1>
<h3 style="color: #555;">Explore ML Algorithms Visually & Analyze Performance</h3>
<p style="font-size: 18px;"><b>Project Description:</b> This project visualizes different machine learning models and their performance on classification and clustering tasks using various datasets.</p>
<p style="font-size: 18px;"><b>Team Members:</b> Ahmad Raza, Hamima Zulfiqar, Aqsa Zia</p>
</div>
""",
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(
"""
<div style="text-align: center; font-size: 16px;">
Made with ❀️ by <b>Team Volund</b>
</div>
""",
unsafe_allow_html=True
)