Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,10 +36,10 @@ if not st.session_state.models:
|
|
36 |
|
37 |
# models
|
38 |
models = {
|
39 |
-
"SVM": SVC(kernel='linear'),
|
40 |
"Logistic Regression": LogisticRegression(max_iter=1000),
|
41 |
"Random Forest": RandomForestClassifier(n_estimators=10),
|
42 |
-
"Gradient Boosting": GradientBoostingClassifier()
|
43 |
}
|
44 |
|
45 |
for name, model in models.items():
|
@@ -82,9 +82,11 @@ if not st.session_state.models:
|
|
82 |
# st.session_state.reports["BERT"] = pd.DataFrame(report).transpose()
|
83 |
|
84 |
if st.session_state.accuracy:
|
85 |
-
|
86 |
plt.figure(figsize=(10, 5))
|
87 |
-
plt.bar(st.session_state.accuracy.keys(), st.session_state.accuracy.values(), color=['blue', 'orange', 'green','red', 'purple'])
|
|
|
|
|
88 |
plt.ylabel('Accuracy')
|
89 |
plt.title('Model Accuracy Comparison')
|
90 |
st.pyplot(plt)
|
|
|
36 |
|
37 |
# models
|
38 |
models = {
|
39 |
+
# "SVM": SVC(kernel='linear'),
|
40 |
"Logistic Regression": LogisticRegression(max_iter=1000),
|
41 |
"Random Forest": RandomForestClassifier(n_estimators=10),
|
42 |
+
# "Gradient Boosting": GradientBoostingClassifier()
|
43 |
}
|
44 |
|
45 |
for name, model in models.items():
|
|
|
82 |
# st.session_state.reports["BERT"] = pd.DataFrame(report).transpose()
|
83 |
|
84 |
if st.session_state.accuracy:
|
85 |
+
color = ['blue','orange']
|
86 |
plt.figure(figsize=(10, 5))
|
87 |
+
# plt.bar(st.session_state.accuracy.keys(), st.session_state.accuracy.values(), color=['blue', 'orange', 'green','red', 'purple'])
|
88 |
+
plt.bar(st.session_state.accuracy.keys(), st.session_state.accuracy.values(), color=color)
|
89 |
+
|
90 |
plt.ylabel('Accuracy')
|
91 |
plt.title('Model Accuracy Comparison')
|
92 |
st.pyplot(plt)
|