A newer version of the Streamlit SDK is available:
1.44.0
metadata
title: Covid Sentiment Anlaysis With Streamlit
emoji: 🏢
colorFrom: gray
colorTo: pink
sdk: streamlit
sdk_version: 1.28.2
app_file: app.py
pinned: false
license: mit
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Sentiment Analysis for Covid Feelings using Transformers and Streamlit
This Python script performs sentiment analysis using pre-trained transformer models from the transformers
library and integrates it into a Streamlit app to analyze sentiments related to Covid feelings.
Installation
Requirements
- Python 3.x
- Required libraries:
transformers
,datasets
,streamlit
Install necessary libraries by running:
pip install -q transformers datasets streamlit
Usage
- Clone or download the script.
- Ensure Python and required libraries are installed.
- Run the script in a Python environment.
The script showcases sentiment analysis using a pre-trained model (avichr/heBERT_sentiment_analysis
) to classify the sentiment of input text into Negative
, Neutral
, or Positive
categories related to Covid feelings.
Steps:
- Preprocesses the input text by handling placeholders for usernames and links.
- Utilizes a pre-trained model (
bert-base-cased
) and the specified sentiment analysis model (avichr/heBERT_sentiment_analysis
). - Calculates sentiment scores using softmax probabilities for each sentiment category.
- Displays sentiment scores in a Streamlit app based on user input.
Additional Information
- The script offers sentiment analysis functionality for Covid-related text input via a Streamlit interface.
- Ensure access to the specified model (
avichr/heBERT_sentiment_analysis
) before running the script. - Users can interact with the Streamlit app by entering text related to Covid feelings to receive sentiment scores for Negative, Neutral, and Positive categories.