SAMH / README.md
Timmyafolami's picture
Update README.md
aa76da4 verified
|
raw
history blame
1.3 kB
metadata
title: Text2textwithDockers
emoji: 🏃
colorFrom: purple
colorTo: red
sdk: docker
pinned: false
license: mit

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

Sentiment Analysis API

alt text

This project provides a sentiment analysis API using FastAPI and a machine learning model trained on textual data.

Features

  • Data ingestion and preprocessing
  • Model training and saving
  • FastAPI application for serving predictions
  • Dockerized for easy deployment

Setup

Prerequisites

  • Docker installed on your system

Build and Run

  1. Build the Docker image:

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

    docker run -p 8000:8000 sentiment-analysis-api
    
  3. Access the API:

Example cURL Command

curl -X POST "http://localhost:8000/predict_sentiment" -H "Content-Type: application/json" -d '{"text": "I love programming in Python."}'