CoolFace
Apppublic

Eswar007/Youtube_Gaming_Comment_Analysis

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
app.py26 linesDownload Raw Back to root
1import streamlit as st2import joblib3 4@st.cache_resource5def load_artifacts():6    vectorizer = joblib.load("Tfidf_Vectorizer.pkl")7    model = joblib.load("youtube1.pkl")8    return vectorizer, model9 10vectorizer, model = load_artifacts()11 12st.set_page_config(page_title="YouTube Comment Classifier", page_icon="๐Ÿ“บ")13st.title("๐Ÿ“บ YouTube Comment Classification App")14st.write("Enter a comment and let the model predict its category.")15 16user_input = st.text_area("Enter your YouTube comment:")17 18if st.button("Predict"):19    if not user_input.strip():20        st.warning("Please enter a comment.")21    else:22        X_input = vectorizer.transform([user_input])23        prediction = model.predict(X_input)[0]24        st.success(f"**Predicted Category:** {prediction}")25 26