Srikanth0804 commited on
Commit
15cfc3d
·
verified ·
1 Parent(s): 9f78ef9

Create pages/2_Model_Training.py

Browse files
Files changed (1) hide show
  1. pages/2_Model_Training.py +54 -0
pages/2_Model_Training.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.title("🧠 Model Training & Evaluation")
4
+
5
+ st.markdown("""
6
+
7
+ 🛠️ **Text Vectorization**
8
+
9
+ Used **TF-IDF Vectorizer** with:
10
+
11
+ 🔢 **max_features** = 10000 to limit dimensionality
12
+
13
+ ---
14
+
15
+ 🤖 **Model Selection**
16
+
17
+ Chose **Logistic Regression** as baseline model
18
+
19
+ Applied **GridSearchCV** to optimize parameters
20
+
21
+ Training pipeline saved using **pickle** for direct deployment
22
+
23
+
24
+
25
+ ---
26
+
27
+ 📊 **Model Evaluation**
28
+
29
+ 📈 **Accuracy Achieved: 0.75**
30
+
31
+
32
+ **Key Metrics:**
33
+
34
+ **Accuracy** 0.75
35
+
36
+ **Precision** 0.81
37
+
38
+ **Recall** 0.77
39
+
40
+ **F1-Score** 0.75
41
+
42
+
43
+ This trained pipeline is now integrated into the final deployment page below.
44
+
45
+
46
+ ---
47
+
48
+ """)
49
+
50
+ if st.button("Next"):
51
+ st.switch_page("pages/3_Deployment.py")
52
+
53
+ if st.button("Go to Data Overview"):
54
+ st.switch_page("pages/1_Data_Overview.py")