Spaces:
Sleeping
Sleeping
MannuGaurav commited on
Commit ·
e0858aa
1
Parent(s): 3462189
Fix weights table rendering
Browse files- app.py +7 -11
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -298,17 +298,13 @@ if st.button("🔍 Detect", type="primary"):
|
|
| 298 |
|
| 299 |
# Ensemble weights
|
| 300 |
st.markdown("### Ensemble Weights")
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
st.markdown("| Model | Weight | F1 |")
|
| 309 |
-
st.markdown("|---|---|---|")
|
| 310 |
-
st.markdown("| Random Forest | 23.4% | 0.886 |")
|
| 311 |
-
st.markdown("| CodeBERT | 37.7% | 0.998 |")
|
| 312 |
|
| 313 |
# Features
|
| 314 |
st.markdown("### Key Features Extracted")
|
|
|
|
| 298 |
|
| 299 |
# Ensemble weights
|
| 300 |
st.markdown("### Ensemble Weights")
|
| 301 |
+
weights_data = {
|
| 302 |
+
"Model": ["Logistic Regression", "SVM", "Random Forest", "CodeBERT"],
|
| 303 |
+
"Weight": ["17.0%", "21.9%", "23.4%", "37.7%"],
|
| 304 |
+
"F1 Score": ["0.818", "0.871", "0.886", "0.998"],
|
| 305 |
+
}
|
| 306 |
+
import pandas as pd
|
| 307 |
+
st.table(pd.DataFrame(weights_data))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
|
| 309 |
# Features
|
| 310 |
st.markdown("### Key Features Extracted")
|
requirements.txt
CHANGED
|
@@ -2,4 +2,5 @@ torch==2.5.1
|
|
| 2 |
transformers==4.41.2
|
| 3 |
streamlit==1.32.0
|
| 4 |
numpy==1.26.4
|
| 5 |
-
scikit-learn==1.3.2
|
|
|
|
|
|
| 2 |
transformers==4.41.2
|
| 3 |
streamlit==1.32.0
|
| 4 |
numpy==1.26.4
|
| 5 |
+
scikit-learn==1.3.2
|
| 6 |
+
pandas==2.1.4
|