Spaces:
Sleeping
Sleeping
| 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') | |