Update app_pages/page1_model_comparison.py
Browse files
app_pages/page1_model_comparison.py
CHANGED
|
@@ -11,11 +11,25 @@ def run():
|
|
| 11 |
|
| 12 |
# Example placeholder for user input
|
| 13 |
user_input = st.text_area("")
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Placeholder buttons for model selection
|
| 16 |
-
if st.button('Classify with BoW/TF-IDF'):
|
| 17 |
-
|
| 18 |
-
if st.button('Classify with LSTM'):
|
| 19 |
-
|
| 20 |
-
if st.button('Classify with ruBERT'):
|
| 21 |
-
|
|
|
|
| 11 |
|
| 12 |
# Example placeholder for user input
|
| 13 |
user_input = st.text_area("")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
if st.button('Classify with All Models'):
|
| 17 |
+
# Bag of Words/TF-IDF prediction
|
| 18 |
+
bow_tfidf_result = predict(user_input)
|
| 19 |
+
st.write(f'{class_prefix} {bow_tfidf_result} according to Bag of Words/TF-IDF.')
|
| 20 |
+
|
| 21 |
+
# LSTM prediction
|
| 22 |
+
lstm_result = predict_review(user_input)
|
| 23 |
+
st.write(f'{class_prefix} {lstm_result} according to LSTM.')
|
| 24 |
+
|
| 25 |
+
# ruBERT prediction
|
| 26 |
+
rubert_result = classify_text(user_input)
|
| 27 |
+
st.write(f'{class_prefix} {rubert_result} according to ruBERT.')
|
| 28 |
+
|
| 29 |
# Placeholder buttons for model selection
|
| 30 |
+
# if st.button('Classify with BoW/TF-IDF'):
|
| 31 |
+
# st.write(f'{class_prefix}{predict(user_input)}')
|
| 32 |
+
# if st.button('Classify with LSTM'):
|
| 33 |
+
# st.write(f'{class_prefix}{predict_review(user_input)}')
|
| 34 |
+
# if st.button('Classify with ruBERT'):
|
| 35 |
+
# st.write(f'{class_prefix}{classify_text(user_input)}')
|