mohAhmad commited on
Commit
3db4a85
Β·
verified Β·
1 Parent(s): 107355f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -0
app.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # --- Page Config ---
4
+ st.set_page_config(page_title="AI Classifier and Clustering Explorer", page_icon="πŸ€–", layout="wide")
5
+
6
+ # --- Project Info Section ---
7
+ st.markdown(
8
+ """
9
+ <div style="text-align: center;">
10
+ <h1 style="color: #4CAF50;">🌟 AI Classifier and Clustering Explorer 🌟</h1>
11
+ <h3 style="color: #555;">Explore ML Algorithms Visually & Analyze Performance</h3>
12
+ <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>
13
+ <p style="font-size: 18px;"><b>Team Members:</b> Zuhair Khan, Quaid Khalid, Anjaleen Swamni, Jay</p>
14
+ </div>
15
+ """,
16
+ unsafe_allow_html=True
17
+ )
18
+
19
+ st.markdown("---")
20
+
21
+ # --- Sidebar Buttons ---
22
+ st.sidebar.title("πŸ”˜ Choose a Task")
23
+
24
+ st.sidebar.markdown("## πŸ“š Classifiers")
25
+ knn_clicked = st.sidebar.button("πŸ”΅ KNN: Diagram & Prediction")
26
+ naive_bayes_clicked = st.sidebar.button("🟒 Naive Bayes: Prediction")
27
+ random_forest_clicked = st.sidebar.button("🟠 Random Forest: Prediction")
28
+
29
+ st.sidebar.markdown("## 🎨 Clustering")
30
+ kmeans_clicked = st.sidebar.button("πŸ”΄ K-Means: Visualization")
31
+
32
+ st.sidebar.markdown("## πŸ“Š Comparison")
33
+ comparison_clicked = st.sidebar.button("πŸ“ˆ Compare All Models")
34
+
35
+ # --- Main Area Display based on Button Click ---
36
+ if knn_clicked:
37
+ st.header("πŸ”΅ K-Nearest Neighbors (KNN)")
38
+ st.write("You selected KNN. Running KNN visualization and prediction...")
39
+ # πŸ”₯ Call your KNN function here
40
+ # your_knn_function()
41
+
42
+ if naive_bayes_clicked:
43
+ st.header("🟒 Naive Bayes Classifier")
44
+ st.write("You selected Naive Bayes. Running prediction...")
45
+ # πŸ”₯ Call your Naive Bayes function here
46
+ # your_naive_bayes_function()
47
+
48
+ if random_forest_clicked:
49
+ st.header("🟠 Random Forest Classifier")
50
+ st.write("You selected Random Forest. Running prediction...")
51
+ # πŸ”₯ Call your Random Forest function here
52
+ # your_random_forest_function()
53
+
54
+ if kmeans_clicked:
55
+ st.header("πŸ”΄ K-Means Clustering")
56
+ st.write("You selected K-Means Clustering. Running visualization...")
57
+ # πŸ”₯ Call your KMeans function here
58
+ # your_kmeans_function()
59
+
60
+ if comparison_clicked:
61
+ st.header("πŸ“ˆ Model Performance Comparison")
62
+ st.write("Comparing performance of all models...")
63
+ # πŸ”₯ Call your comparison function here
64
+ # your_performance_comparison_function()
65
+
66
+ # --- Footer ---
67
+ st.markdown("---")
68
+ st.markdown(
69
+ """
70
+ <div style="text-align: center; font-size: 16px;">
71
+ Made with ❀️ by <b>Team Volund</b>
72
+ </div>
73
+ """,
74
+ unsafe_allow_html=True
75
+ )