--- title: StressDetection emoji: 🧘 colorFrom: red colorTo: red sdk: docker app_port: 8501 tags: - streamlit pinned: false short_description: NLP app to detect stress in social media posts. license: mit --- # 🧠 Stress Detection from Text This project is a simple NLP application that detects stress in social media text. The app uses a **TF-IDF Vectorizer** and **Logistic Regression** to classify text as **Stress (1)** or **No Stress (0)**. --- ## 🚀 Demo Users can enter a text (for example a social media post), and the model will predict whether the text shows signs of stress. --- ## 🧠 Model Overview - **Text Preprocessing:** TF-IDF Vectorization - **Model:** Logistic Regression - **Task:** Binary Text Classification - **Labels:** - `0` → No Stress - `1` → Stress The model achieved an accuracy of about **74%** on the test set. --- ## 📂 Files in This Repository - `streamlit_app.py` → Streamlit application - `tfidf_lr_pipeline.pkl` → Trained TF-IDF + Logistic Regression pipeline - `requirements.txt` → Required Python libraries --- ## ▶️ How to Run Locally ```bash pip install -r requirements.txt streamlit run streamlit_app.py