File size: 498 Bytes
da53e73
12d7d99
da53e73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9dd1bb1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import streamlit as st
import pickle

st.title('Uzbek Text Classification')

text = st.text_area('Enter Uzbek Text')

if text:
    with open('trained_model100.pkl', 'rb') as file:
        model = pickle.load(file)

    with open('vectorizer.pkl', 'rb') as file:
        vectorizer = pickle.load(file)

    text_vectorized = vectorizer.transform([text])

    predicted_genre = model.predict(text_vectorized)

    st.subheader(str(predicted_genre).replace("'", '').replace('[', ''). replace(']', ''))