File size: 641 Bytes
169057e
 
 
087390d
169057e
 
087390d
169057e
 
 
 
 
 
 
 
 
087390d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
import joblib
import pandas as pd
from models.model1.Custom_class import TextPreprocessor

# Load the trained pipeline
pipeline = joblib.load('models/model1/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]}')
    st.write(f'1 - negative, 0 - positive')