A newer version of the Gradio SDK is available:
5.13.1
title: Covid Sentiment With Gradio
emoji: π
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 4.5.0
app_file: app.py
pinned: false
license: mit
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Sentiment Analysis with Transformers and Gradio
This script performs sentiment analysis using pre-trained transformer models from the transformers
library and sets up a user interface using Gradio
for interaction.
Installation
Requirements
- Python 3.x
- Required libraries:
transformers
,datasets
,gradio
Install necessary libraries by running:
pip install -q transformers datasets gradio
Usage
- Clone or download the script.
- Ensure Python and required libraries are installed.
- Run the script in a Python environment.
The script demonstrates sentiment analysis using a pre-trained model (avichr/heBERT_sentiment_analysis
) to classify the sentiment of input text into Negative
, Neutral
, or Positive
categories.
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
). - Performs sentiment analysis on the provided text, showcasing the confidence scores for each sentiment category.
Additional Information
- The script demonstrates two methods for sentiment analysis using both PyTorch-based and TensorFlow-based transformer models.
- The Gradio interface allows users to input text and get a sentiment label prediction based on the pre-trained model.
Please ensure proper environment setup and access to the specified model (avichr/heBERT_sentiment_analysis
) before running the script
Sentiment Analysis with Transformers and Gradio
This script performs sentiment analysis using pre-trained transformer models from the transformers
library and sets up a user interface using Gradio
for interaction.
Installation
Requirements
- Python 3.x
- Required libraries:
transformers
,datasets
,gradio
Install necessary libraries by running:
pip install -q transformers datasets gradio
Usage
- Clone or download the script.
- Ensure Python and required libraries are installed.
- Run the script in a Python environment.
The script demonstrates sentiment analysis using a pre-trained model (avichr/heBERT_sentiment_analysis
) to classify the sentiment of input text into Negative
, Neutral
, or Positive
categories.
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
). - Performs sentiment analysis on the provided text, showcasing the confidence scores for each sentiment category.
Additional Information
- The script demonstrates two methods for sentiment analysis using both PyTorch-based and TensorFlow-based transformer models.
- The Gradio interface allows users to input text and get a sentiment label prediction based on the pre-trained model.
Please ensure proper environment setup and access to the specified model (avichr/heBERT_sentiment_analysis
) before running