Spaces:
Sleeping
Sleeping
Commit
•
81873b3
1
Parent(s):
e4ab235
Update README.md
Browse files
README.md
CHANGED
@@ -7,4 +7,23 @@ sdk: docker
|
|
7 |
pinned: false
|
8 |
---
|
9 |
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
pinned: false
|
8 |
---
|
9 |
|
10 |
+
## Overview
|
11 |
+
|
12 |
+
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.
|
13 |
+
|
14 |
+
## Endpoints
|
15 |
+
|
16 |
+
**/** - The main page of the app. Users enter text here to be sent for sntiment analysis.\
|
17 |
+
**/analyze** - This endpoint is responsible for sendng text to the model and displaying the results.
|
18 |
+
|
19 |
+
## Documentation and Testing
|
20 |
+
|
21 |
+
FastAPI provides documentation endpoint at **/docs** where you can test API endpoints and send data.
|
22 |
+
|
23 |
+
## Docker Build
|
24 |
+
|
25 |
+
You can run a local container of the app using docker
|
26 |
+
|
27 |
+
1. Clone the repository into your machine.
|
28 |
+
2. Run `docker build Dockerfile` inside root directory of the space to build a docker image file.
|
29 |
+
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`>`
|