nlp-bert-team / pages /policlinic.py
VerVelVel's picture
logreg and toxic bert
169057e
raw
history blame
No virus
527 Bytes
import streamlit as st
import joblib
import pandas as pd
# Load the trained pipeline
pipeline = joblib.load('logistic_regression_pipeline.pkl')
# Streamlit application
st.title('Классификация отзывов на русском языке')
input_text = st.text_area('Введите текст отзыва')
if st.button('Предсказать'):
prediction = pipeline.predict(pd.Series([input_text]))
st.write(f'Предсказанный класс с помощью логрег: {prediction[0]}')