from math import e import streamlit as st from PIL import Image st.title("NLP project") description_show_options = ['main','film_review','toxic_messages','над проектом работали'] description_show = st.sidebar.radio("Description", description_show_options) if description_show == 'над проектом работали': st.title(" над проектом работали") col1, col2, col3 = st.columns(3) with col1: romaimage = Image.open("images/roma.png") st.image(romaimage, caption="Рома | custom attention enjoyer | DevOps", use_column_width=True, ) with col2: leraimage = Image.open("images/Lera.png") st.image(leraimage, caption="Лера | GPT bender | Data Scientist", use_column_width=True) with col3: olyaimage = Image.open("images/baur.jpg") st.image(olyaimage, caption="Бауржан | TF/IDF master | Frontender", use_column_width=True) elif description_show == 'GPT': st.title("GPT") elif description_show == 'main': st.title("main") elif description_show == 'film_review': st.title("film_review") st.write("------------") st.write("BERT embedding + LSTM + roman attention") text = """Weighted F1-score: 0.70\n Classification Report: precision recall f1-score support Bad 0.67 0.81 0.74 960 Neutral 0.65 0.50 0.56 922 Good 0.82 0.82 0.82 896 ----- accuracy 0.71 2778 macro avg 0.71 0.71 0.71 2778 weighted avg 0.71 0.71 0.71 2778""" st.markdown(text) png = Image.open("images/film_lstm.png") st.image(png, use_column_width=True) st.write("------------") st.write("tf-idf + Logreg") png = Image.open("images/film_tfidf.jpg") st.image(png, use_column_width=True) png = Image.open("images/tf_idf_cm.jpg") st.image(png, use_column_width=True) st.write("------------") st.write("Bert embedding + LogReg") png = Image.open("images/film_bert.jpg") st.image(png, use_column_width=True) elif description_show == 'toxic_messages': st.title("toxic_messages") png = Image.open("images/toxic.png") st.image(png, use_column_width=True) elif description_show == 'toxic_messages': st.title("toxic_messages")