|
--- |
|
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: |
|
|
|
```bash |
|
pip install -q transformers datasets gradio |
|
``` |
|
|
|
## Usage |
|
|
|
1. Clone or download the script. |
|
2. Ensure Python and required libraries are installed. |
|
3. 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: |
|
1. Preprocesses the input text by handling placeholders for usernames and links. |
|
2. Utilizes a pre-trained model (`bert-base-cased`) and the specified sentiment analysis model (`avichr/heBERT_sentiment_analysis`). |
|
3. 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: |
|
|
|
```bash |
|
pip install -q transformers datasets gradio |
|
``` |
|
|
|
## Usage |
|
|
|
1. Clone or download the script. |
|
2. Ensure Python and required libraries are installed. |
|
3. 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: |
|
1. Preprocesses the input text by handling placeholders for usernames and links. |
|
2. Utilizes a pre-trained model (`bert-base-cased`) and the specified sentiment analysis model (`avichr/heBERT_sentiment_analysis`). |
|
3. 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 |
|
|