CoolFace
Apppublic

vengga/cds6344-group9-absa-spam-detection

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

CDS6344 Group 9: ABSA and Opinion Spam-Risk Detection App

This Hugging Face Space hosts the Streamlit application for the CDS6344 Social Media Computing project by Group 9.

The app demonstrates an end-to-end social media review analysis pipeline using:

  • —Aspect-Based Sentiment Analysis (ABSA)
  • —Fine-tuned Sentiment RoBERTa model
  • —Opinion spam-risk detection
  • —Project dashboard visualizations
  • —Model comparison summary

Live App Purpose

The application allows users to:

  1. 1.View the project overview and dataset summary
  2. 2.Predict aspect-level sentiment using the fine-tuned Sentiment RoBERTa model
  3. 3.Test opinion spam-risk detection using rule-based review signals
  4. 4.View project visualizations and model comparison results
  5. 5.Review the final methodology and project documentation

Group Members

NameStudent ID
Venggadanaathan1231303562
Tharraniah Tamilwanan1211111799

Final Model

The deployed app uses the local fine-tuned Sentiment RoBERTa model stored in:

text
model/sentiment_roberta_finetuned/

Final evaluated performance:

MetricValue
Accuracy82.26%
Macro F1-score81.97%
Weighted F1-score82.21%

The app uses lazy loading, so the model is loaded only when the ABSA Predictor page is used. This improves startup time for the Space.


Opinion Spam-Risk Detection

The app also includes a rule-based spam-risk detector developed in Notebook 4.

Spam-risk features include:

  • —Rating-text sentiment conflict
  • —External promotional/contact signals
  • —Rating deviation from app average
  • —Repeated punctuation
  • —High word repetition
  • —Very short or very long reviews
  • —High uppercase ratio
  • —Weak commercial term tracking

Important note:

High-risk reviews are not confirmed spam. They are reviews that require manual inspection.


Project Repository

The full project repository is available at:

text
https://github.com/Vengga/CDS6344_Group9_Project

The GitHub repository contains:

  • —Project notebooks
  • —Streamlit app code
  • —Data files
  • —Dashboard image assets
  • —README documentation

Space Deployment Details

This Space is deployed using Docker.

The Dockerfile runs the Streamlit application on port 7860:

bash
streamlit run app.py --server.port=7860 --server.address=0.0.0.0 --server.headless=true --server.enableCORS=false --server.enableXsrfProtection=false

The Space metadata uses:

yaml
sdk: docker
app_port: 7860

Folder Structure

text
.
├── app.py
├── Dockerfile
├── README.md
├── requirements.txt
├── data/
│   ├── final_aspect_level_model_comparison_updated.csv
│   ├── final_best_model_summary_updated.csv
│   ├── final_spam_detection_findings.csv
│   └── review_level_social_reviews_with_spam_risk.csv
└── model/
    └── sentiment_roberta_finetuned/
        ├── config.json
        ├── model.safetensors or pytorch_model.bin
        ├── tokenizer_config.json
        ├── tokenizer.json
        ├── vocab.json
        ├── merges.txt
        ├── special_tokens_map.json
        └── streamlit_model_config.json

Dashboard images are loaded from the GitHub repository using raw GitHub asset URLs to avoid binary PNG upload issues in the Space repository.


Requirements

text
streamlit
pandas
matplotlib
torch
transformers
scipy
safetensors

Notes for Users

  • —The first startup may take longer because the Docker container and Python dependencies need to initialize.
  • —The first ABSA prediction may take longer because the fine-tuned RoBERTa model is loaded lazily.
  • —If the app restarts after inactivity, wait for the Space to prepare again.
  • —The deployed app is intended for academic demonstration and project evaluation.

Authors

Group 9 Faculty of Computing and Informatics Multimedia University