Spaces:
Sleeping
Sleeping
title: Sentiment Analysis | |
emoji: ⚡ | |
colorFrom: yellow | |
colorTo: indigo | |
sdk: docker | |
pinned: false | |
## Overview | |
Sentiment Analysis tool utilizing [Roberta-Base pretrained model](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest) called using endpoints made with FastAPI. Containerized into a Docker Image. | |
## Endpoints | |
**/** - The main page of the app. Users enter text here to be sent for sntiment analysis.\ | |
**/analyze** - This endpoint is responsible for sendng text to the model and displaying the results. | |
## Documentation and Testing | |
FastAPI provides documentation endpoint at **/docs** where you can test API endpoints and send data. | |
## Docker Build | |
You can run a local container of the app using docker | |
1. Clone the repository into your machine. | |
2. Run `docker build Dockerfile` inside root directory of the space to build a docker image file. | |
3. Start a container from the image using `docker run -p <preferred-port>:7860 <image-name or image-sha>`. This will map virtual port 7860 to a port of your choosing, allowing you to access the endpoints at localhost:`<`preferred-port`>` |