ambig_fastapi / README.md
mariasaif20's picture
Update README.md
91e7a57 verified

A newer version of the Streamlit SDK is available: 1.56.0

Upgrade
metadata
title: Ambig Fastapi
emoji: 😻
colorFrom: pink
colorTo: blue
sdk: streamlit
sdk_version: 1.33.0
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

Sentiment Analysis API

This API analyzes the sentiment of text using a pre-trained model from Hugging Face Transformers.

Instructions

Running Locally

  1. Install Docker on your machine.

  2. Clone this repository.

  3. Navigate to the cloned directory.

  4. Build the Docker container:

    docker build -t sentiment-analysis-api .
    
  5. Run the Docker container:

    docker run -d -p 8000:8000 sentiment-analysis-api
    
  6. Access the API documentation at http://localhost:8000/docs.

Interacting with the API

Send a POST request to /analyze endpoint with a JSON object containing the text to analyze.

Example:

{
  "text": "I love this product!"
}


Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference