{"id":15686345,"url":"https://github.com/prrao87/fine-grained-sentiment-app","last_synced_at":"2025-07-17T16:34:56.736Z","repository":{"id":46067632,"uuid":"204050387","full_name":"prrao87/fine-grained-sentiment-app","owner":"prrao87","description":"A Flask LIME explainer app for fine-grained sentiment classification.","archived":false,"fork":false,"pushed_at":"2023-05-01T21:20:09.000Z","size":15571,"stargazers_count":12,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T18:04:42.575Z","etag":null,"topics":["flask","interpretability","lime","lime-explainer","nlp","visualization","web-app"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prrao87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-23T18:27:52.000Z","updated_at":"2024-11-06T14:42:30.000Z","dependencies_parsed_at":"2024-10-23T19:31:27.809Z","dependency_job_id":"e990a198-3518-4ba3-9c06-0d963e7b9af0","html_url":"https://github.com/prrao87/fine-grained-sentiment-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Ffine-grained-sentiment-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Ffine-grained-sentiment-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Ffine-grained-sentiment-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Ffine-grained-sentiment-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prrao87","download_url":"https://codeload.github.com/prrao87/fine-grained-sentiment-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931532,"owners_count":21827111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","interpretability","lime","lime-explainer","nlp","visualization","web-app"],"created_at":"2024-10-03T17:38:37.716Z","updated_at":"2025-05-07T18:09:15.419Z","avatar_url":"https://github.com/prrao87.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Explainer App for Fine Grained Sentiment Classification\n\nThis repo contains an initial prototype of an interactive application written in Flask, that explains the results of fine-grained sentiment classification, described in detail in [this Medium Series](https://medium.com/@tech_optimist/fine-grained-sentiment-analysis-in-python-part-2-2a92fdc0160d).\n\nA number of classifiers are implemented and their results explained using the [LIME explainer](https://arxiv.org/pdf/1602.04938.pdf). \nThe classifers were trained on the  [Stanford Sentiment Treebank](https://nlp.stanford.edu/sentiment/) (SST-5) dataset. The class labels are any of `[1, 2, 3, 4, 5]`, where `1` is very negative and `5` is very positive. \n\n\n## Installation\n\nFirst, set up virtual environment and install from ```requirements.txt```:\n\n    python3 -m venv venv\n    source venv/bin/activate\n    pip3 install -r requirements.txt\n\nFor further development, simply activate the existing virtual environment.\n\n    source venv/bin/activate\n\n\n## Usage\n\nRun the file `app.py` and then enter a sentence, choose a type of classifier and click on the button `Explain results!`. We can then observe the features (i.e. words or tokens) that contributed to the classifier predicting a particular class label. \n\n## Demo for the front-end\nThe front-end app takes in a text sample and outputs LIME explanations for the different methods. The app is is deployed using Heroku at this location: https://sst5-explainer.herokuapp.com/\n\nPlay with your own text examples as shown below and see the fine-grained sentiment results explained!\n\n**NOTE:** Because the PyTorch-based models (Flair and the causal transformer) are quite expensive to run inference with (they require a GPU), these methods are not deployed.\n\n![](data/assets/explainer-app.gif)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprrao87%2Ffine-grained-sentiment-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprrao87%2Ffine-grained-sentiment-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprrao87%2Ffine-grained-sentiment-app/lists"}