Update README.md
Browse files123---license: mit---1234567891011121314151617181920212223242526272829303132333435363738394041424344454647---language:- entags:- sentiment-analysis- text-classification- scikit-learnpipeline_tag: text-classificationlibrary_name: scikit-learn---# IMDB Movie Review Sentiment ClassifierThis model classifies English movie reviews into **Positive** or **Negative** sentiment using TF-IDF and Logistic Regression trained on the 50,000 IMDB dataset.- **Accuracy**: ~90.95%- **Algorithm**: Logistic Regression with `TfidfVectorizer` (unigrams + bigrams)## How to UseDownload and run predictions with Python using `huggingface_hub`:```pythonimport osimport joblibfrom huggingface_hub import hf_hub_download# Download model and vectorizer from this repositoryREPO_ID = "YOUR-USERNAME/imdb-sentiment-analysis"model_path = hf_hub_download(repo_id=REPO_ID, filename="sentiment_model.pkl")vectorizer_path = hf_hub_download(repo_id=REPO_ID, filename="tfidf_vectorizer.pkl")# Load model and vectorizermodel = joblib.load(model_path)vectorizer = joblib.load(vectorizer_path)# Test reviewreviews = ["This movie was magnificent!", "Terrible waste of time."]reviews_tfidf = vectorizer.transform(reviews)predictions = model.predict(reviews_tfidf)for review, pred in zip(reviews, predictions):sentiment = "Positive" if pred == 1 else "Negative"print(f"{review} -> {sentiment}")```
README.md+45-1